On this page
Step 1: List your snapshots
Every restore starts by finding the right snapshot ID. Before you need a restore, verify your restic backups with restic check and --read-data so the restore is not the first test.
source /etc/restic/env
# List all snapshots
restic snapshots
# List snapshots for a specific host
restic snapshots --host web01
# List snapshots with a specific tag
restic snapshots --tag productionRestore a full snapshot
Restore into an empty target directory, then move files into place. Use latest or a snapshot ID from step 1:
# Restore the most recent snapshot
restic restore latest --target /tmp/full-restore
# Restore a specific snapshot by ID
restic restore a1b2c3d4 --target /tmp/restore-20260101
# Restore to original location (be careful: overwrites existing files)
restic restore latest --target /Restore a specific file or directory
Use --include to pull back only what you need:
# Restore a single file
restic restore latest \
--target /tmp/restore \
--include /etc/nginx/nginx.conf
# Restore an entire directory
restic restore latest \
--target /tmp/restore \
--include /var/www/mysite
# Restore multiple paths
restic restore latest \
--target /tmp/restore \
--include /etc \
--include /var/wwwRestored files keep their original path under the target: /etc/nginx/nginx.conf restored to /tmp/restore lands at /tmp/restore/etc/nginx/nginx.conf.
Mount and browse without restoring
With FUSE installed, you can mount the repository and browse snapshots like folders, copying out only what you need:
apt install -y fuse
mkdir -p /mnt/restic
# Mount the repository
restic mount /mnt/restic &
# Browse snapshots
ls /mnt/restic/snapshots/
ls /mnt/restic/snapshots/latest/etc/
# Copy a specific file
cp /mnt/restic/snapshots/latest/var/www/index.html /tmp/
# Unmount
umount /mnt/resticVerify backup integrity before you need it
Check the repository on a schedule:
# Quick check (metadata only, fast)
restic check
# Full check (reads all data, slow but thorough)
restic check --read-data
# Check a random 10% sample (good balance)
restic check --read-data-subset=10%Run restic check monthly and restic check --read-data-subset=10% quarterly to catch corruption early.
Restore after complete system loss
To rebuild a machine, boot a live environment, install restic, set your credentials and restore. Keep RESTIC_REPOSITORY and RESTIC_PASSWORD off the machine, in a password manager or a locked printout.
Restore performance and what affects it
Restore speed is bounded by your download speed and chunk reassembly; a single file downloads only its own chunks. On SFTP backends, --option sftp.connections=8 raises parallelism.
Restoring specific file types: practical examples
Most real restores are one service's files. These one-liners restore to /tmp/r so you can inspect before copying back:
- Nginx config:
restic restore latest --target /tmp/r --include /etc/nginx, then diff and apply selectively - PostgreSQL dump:
restic restore latest --target /tmp/r --include /var/backups/postgres, thenpsql -f /tmp/r/var/backups/postgres/dump.sql - SSH keys:
restic restore latest --target /tmp/r --include /root/.ssh, then copy with correct permissions - Docker volume:
restic restore latest --target /tmp/r --include /var/lib/docker/volumes/myapp_data, then copy back to volume path
The test restore habit
Restore one file every month and a full snapshot every quarter. No egress fees, so tests cost nothing.