Skip to content

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 snapshots

Restore Full Snapshot โ€‹

bash
restic -r rclone:gdrive:backups/vps-monthly restore latest --target /path/to/restore

Restore 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.

Released under proprietary license.