Illustrated title card for the guide: How to Verify Restic Backups With a Restore Drill
backup

How to Verify Restic Backups With a Restore Drill

Check your Restic repository, choose a full or partial pack check, and restore one file to an empty directory with content verification.

To verify a Restic backup, run restic check and choose a full or partial pack read. Then pick one file from a specific snapshot and restore it to a separate empty directory with --verify.

Use an existing repository you can access and have its password ready. Preparing a new repository

Replace the example repository path /srv/restic-repo, snapshot ID 79766175, sample path /home/user/work/foo, and destination /tmp/restore with your own values.

Check the repository structure

The default check examines the structural consistency of the repository, including snapshots, trees, and pack files. To make check read and verify the backed-up data in the packs, use a data check flag. Working with repositories

In a Linux shell, use echo $? to inspect the exit status. Backing up

Run echo $? immediately after the structure check, your chosen pack check, and the verified restore, before running another command.

restic -r /srv/restic-repo check

Choose how many packs to read

CheckCommandCoverage
Fullrestic -r /srv/restic-repo check --read-dataDownloads and verifies all pack files in the repository. Working with repositories
Subsetrestic -r /srv/restic-repo check --read-data-subset=1/5Reads and checks the first of five roughly equal groups of pack files. Working with repositories

Choose one of these commands for the drill. Use the subset if you want to limit how much data the check reads.

Pick a snapshot and sample file

List the repository’s snapshots. The listing includes the snapshot ID, date, host, and backed-up path. Snapshot listing example

restic -r /srv/restic-repo snapshots

Choose the ID for the date, host, and path you want to recover. Use that ID with ls to list the files and directories in the snapshot. restic-ls(1)

restic -r /srv/restic-repo ls 79766175

Absolute and relative backup inputs produce different directory structures in the snapshot. Backing up

The --include option takes a pattern. restic-restore(1)

For this drill, choose a file whose snapshot path has no pattern metacharacters. Copy the file’s exact path from the ls output for --include when passing the snapshot ID on its own. Restoring from backup

Restore the sample to an empty directory

Use an empty directory as the target for the drill. Restic overwrites existing files at the target by default. Restoring from backup

Set --target to that directory and --include to the file’s path in the snapshot. Restoring from backup

The --verify flag checks the contents of the restored files. restic-restore(1)

restic -r /srv/restic-repo restore 79766175 --target /tmp/restore --include '/home/user/work/foo' --verify

Look for the file at /tmp/restore/home/user/work/foo. Restic keeps the path from the snapshot under the target directory in this form of the command. Restoring from backup

Decide whether the drill passed

  • Confirm that the structure check, your chosen pack check, and the verified restore each exited with status 0. That status means the command succeeded. restic-check(1) · restic-restore(1)

Mark the drill as passed when the commands succeed and the restored file is at the expected path.

Save the check output for troubleshooting. Troubleshooting

Evidence and limits

This drill follows the Restic 0.20.0 repository and restore documentation and command manuals, checked on 27 November 2026. Working with repositories · restic-restore(1)

No hands-on testing was performed for this guide. The drill covers repository checks and a single-file restore to a separate directory.

Sources

  1. Preparing a new repository
  2. Working with repositories
  3. Removing backup snapshots
  4. restic-ls(1), v0.20.0
  5. Backing up
  6. Restoring from backup
  7. restic-restore(1), v0.20.0
  8. restic-check(1), v0.20.0
  9. Troubleshooting

Related