Appearance
Disaster Recovery & Manual Rescues โ
๐ฏ Overview โ
In the event of a backup failure or system crash, this guide provides the procedures for manually intervening and rescuing the backup state.
๐ Manual Rescue Workflow โ
If a backup job is interrupted (e.g., due to a network timeout or system reboot), the Restic repository may remain "locked."
1. Identify the Problem โ
Check the logs at /var/log/restic-backup.log (daily) or /var/log/monthly-backup.log (monthly). Common issues include:
repository is already locked: Indicates a previous run crashed.rclone: Token expired: Indicates GDrive authentication failure.
2. The Rescue Procedure โ
Use the standardized workflow defined in the project:
bash
# Unlock the repository
restic -r rclone:gdrive:backups/vps-monthly unlock
# Resume the backup (Restic will deduplicate data)
bash /usr/local/bin/monthly-full-backup.sh๐ Data Restoration โ
To restore data to a new system or recover lost files:
List Snapshots โ
bash
restic -r rclone:gdrive:backups/vps-monthly snapshotsRestore Full Snapshot โ
bash
restic -r rclone:gdrive:backups/vps-monthly restore latest --target /path/to/restoreRestore Specific Folder โ
bash
restic -r rclone:gdrive:backups/vps-monthly restore latest --target /tmp/recovery --include /home/christian/data๐งช Verification โ
Always run backup-health-check.sh on the VPS after a manual rescue to ensure the repository remains consistent.