Restoring a file from an rsync backup directly into the live path can replace newer data or hide which snapshot supplied the recovery. A separate recovery directory keeps the restored copy available for inspection before any application, user home, or service directory is touched.
The rsync command can restore from a local backup tree, mounted backup volume, or remote rsync source using the same source-to-destination pattern used for backups. The --archive option preserves common file metadata, while --relative with a /./ marker keeps only the path segment after that marker under the recovery root.
Use a dry run before the restore when the source path is long or the backup contains multiple similar snapshots. A dry run with --itemize-changes shows the directories and file that rsync would create, and the final checksum or metadata check confirms that the recovered copy matches the backup copy before it is handed back to the owner.
Example backup file: /backups/2026-06-06/home/alex/docs/report.txt. Example recovery root: /srv/recovery/2026-06-06/. The /./ marker in later commands tells rsync to preserve only home/alex/docs/report.txt below the recovery root.
$ sudo install -d -m 0750 /srv/recovery/2026-06-06
$ sudo rsync --archive --relative --dry-run --itemize-changes /backups/2026-06-06/./home/alex/docs/report.txt /srv/recovery/2026-06-06/ cd+++++++++ home/ cd+++++++++ home/alex/ cd+++++++++ home/alex/docs/ >f+++++++++ home/alex/docs/report.txt
No file is copied during the dry run. The itemized output shows the parent directories and restored file that would be created under the recovery root.
$ sudo rsync --archive --relative --itemize-changes /backups/2026-06-06/./home/alex/docs/report.txt /srv/recovery/2026-06-06/ cd+++++++++ home/ cd+++++++++ home/alex/ cd+++++++++ home/alex/docs/ >f+++++++++ home/alex/docs/report.txt
Do not add --delete or point the destination at a live directory unless the restore plan explicitly requires replacing existing data.
$ sudo sha256sum /backups/2026-06-06/home/alex/docs/report.txt /srv/recovery/2026-06-06/home/alex/docs/report.txt 490e4e7624d80301d70f2ffd1776aa2fd03e2a7f0db74c9dce733002a09283c0 /backups/2026-06-06/home/alex/docs/report.txt 490e4e7624d80301d70f2ffd1776aa2fd03e2a7f0db74c9dce733002a09283c0 /srv/recovery/2026-06-06/home/alex/docs/report.txt
$ sudo stat -c '%n %U:%G %a %s bytes' /backups/2026-06-06/home/alex/docs/report.txt /srv/recovery/2026-06-06/home/alex/docs/report.txt /backups/2026-06-06/home/alex/docs/report.txt root:root 640 40 bytes /srv/recovery/2026-06-06/home/alex/docs/report.txt root:root 640 40 bytes
The restored copy is ready for owner review or for the separate application-specific step that returns it to service.