Restore a snapshot
Restore the files from a snapshot into a new directory.
Before you begin
- Back up files so that the repository contains at least one snapshot.
Steps
-
Restore the latest snapshot to a target directory:
bash restic restore latest --target /tmp/restic-restore-test --repo /tmp/restic-demo-repo -
Enter the repository password when prompted.
-
List the restored files:
bash find /tmp/restic-restore-test -name notes.txtRestic recreates the original directory path inside the target directory, so the file appears under that path.
Restore a specific snapshot
Replace latest with a snapshot ID from the output of restic snapshots:
restic restore 1a2b3c4d --target /tmp/restic-restore-test --repo /tmp/restic-demo-repo