Restore is the real test of a backup. This episode teaches you how to restore an entire snapshot with `restic restore`, pull a single file to stdout with `restic dump`, and do partial restores using `--include`/`--exclude` without clobbering other directories.

In episode 4 you produced your first snapshot. Now we learn the other, more important side: bringing data back. A backup that cannot be restored is just an expensive pile of junk — restic's restore-first philosophy really makes sense in this episode.
We will walk through three scenarios: full restore, single-file extract, and a partial restore with include/exclude patterns.
The most basic command restores the entire snapshot contents into a target directory:
restic restore 8b0a7f2e --target /tmp/restoreAs a result, the snapshot contents are laid out under /tmp/restore following their original structure — for example /tmp/restore/home/user/.... Restic never overwrites files that already exist outside the snapshot paths: it writes the structure into --target, so it is safe to restore over an active directory.
Instead of copying an ID by hand, select the snapshot dynamically:
restic restore latest --target /tmp/restore --path /home/user
restic restore latest --target /tmp/restore --tag dailylatest means the most recent snapshot matching the given --path/--tag filter — very useful in automation scripts.
restic dump pulls one file and sends its contents to stdout — without writing to disk, perfect for inspecting a config file's contents or combining with other commands:
restic dump 8b0a7f2e /etc/nginx/nginx.confThe most useful combination: recovering one file directly to its original location:
restic dump 8b0a7f2e /etc/nginx/nginx.conf > /etc/nginx/nginx.confBe careful with the redirect overwriting the original file — first verify the stdout contents (restic dump ... | head).
When you only need part of a snapshot, don't restore everything — that wastes time and disk. Use --include to select what gets restored:
restic restore 8b0a7f2e --target /tmp/restore \
--include /home/user/DocumentsOr --exclude to drop unwanted parts:
restic restore 8b0a7f2e --target /tmp/restore \
--exclude /home/user/.cacheJust like backup, patterns follow filepath.Match rules. Remember: --include and --exclude apply to the restore, while the snapshot filter (which one is selected) is decided by --path/--tag/latest.
Important
restic restore does not protect from overwriting files that already exist at the target if their path is in the snapshot — the file will be overwritten with the snapshot's contents. If you want to compare first, restore into an empty directory and move things manually.
A practical flow for when you must recover a lost file:
restic find 8b0a7f2e "report-2026.pdf"
restic dump 8b0a7f2e "/home/user/report-2026.pdf" > report-2026.pdfrestic find tracks down files by name/pattern inside the snapshot — the perfect partner for dump.
restic restore <id> --target <dir> restores the entire snapshot into a structure under the target.latest with --path/--tag dynamically selects the newest matching snapshot.restic dump extracts a single file to stdout — fast, without touching disk.--include to select, --exclude to drop.In the next episode, episode 6, we enter the heart of restic's efficiency: deduplication, storage & compression — how content-defined chunking makes repeated backups store only the delta, reading dedup numbers with restic stats --mode raw-data, and how zstd compression (--compression auto) has been saving storage since it became the default in version 0.14+.