Introduce comprehensive recipes for Restic-based S3 backups. Covers installation, S3 repository configuration, automated backup job creation, and restoration of files.
1.2 KiB
1.2 KiB
Restore Backup
This recipe restores files from a Restic repository.
Load Environment
source <(sudo cat /etc/restic.env)
List Snapshots
restic snapshots
Expected output:
ID Time Host
----------------------------------------
xxxxxxxx YYYY-MM-DD HH:MM
Restore Latest Snapshot
restic restore latest --target /tmp/restore
Restore Specific Snapshot
Replace <snapshot-id> with the desired snapshot.
restic restore <snapshot-id> --target /tmp/restore
Restore a Single Directory
restic restore latest --target /tmp/restore --include <PATH>
Replace:
<PATH>with the folder path you want to restore (e.g./srv/samba)
Verify Restored Files
ls -la /tmp/restore
Verify Repository Integrity
restic check
Expected output:
no errors were found
Troubleshooting
Repository not found
Verify:
echo $RESTIC_REPOSITORY
Authentication failed
Verify the configured S3 credentials.
echo $AWS_ACCESS_KEY_ID
echo $AWS_SECRET_ACCESS_KEY
Wrong password
Verify:
echo $RESTIC_PASSWORD