# Restore Backup This recipe restores files from a Restic repository. ## Load Environment ```bash source <(sudo cat /etc/restic.env) ``` ## List Snapshots ```bash restic snapshots ``` Expected output: ```text ID Time Host ---------------------------------------- xxxxxxxx YYYY-MM-DD HH:MM ``` ## Restore Latest Snapshot ```bash restic restore latest --target /tmp/restore ``` ## Restore Specific Snapshot Replace `` with the desired snapshot. ```bash restic restore --target /tmp/restore ``` ## Restore a Single Directory ```bash restic restore latest --target /tmp/restore --include ``` Replace: - `` with the folder path you want to restore (e.g. `/srv/samba`) ## Verify Restored Files ```bash ls -la /tmp/restore ``` ## Verify Repository Integrity ```bash restic check ``` Expected output: ```text no errors were found ``` ## Troubleshooting ### Repository not found Verify: ```bash echo $RESTIC_REPOSITORY ``` ### Authentication failed Verify the configured S3 credentials. ```bash echo $AWS_ACCESS_KEY_ID ``` ```bash echo $AWS_SECRET_ACCESS_KEY ``` ### Wrong password Verify: ```bash echo $RESTIC_PASSWORD ```