Backup & Restore

Summary Overview

Procedures for automated backups and disaster recovery scenarios.

Updated: 2025-01-15
backupdisaster-recoverymaintenance

Backup Strategy

We follow the 3-2-1 Rule:

  • 3 copies of data.
  • 2 different media types (SSD + HDD).
  • 1 offsite copy (Encrypted Cloud Storage).

Automated Backups

We use Restic for automated, encrypted snapshots of persistent volumes.

# Manual trigger for a backup job
docker exec -it backup-container restic backup /data

Backups run nightly at 03:00 AM UTC.

Restore Procedure

File-Level Restore

To restore a specific configuration file:

  1. List available snapshots:
    restic snapshots
    
  2. Restore the target file:
    restic restore latest --target /restore-temp --include "/data/config.json"
    

Full Disaster Recovery

In case of total server failure:

  1. Provision new hardware/VM.
  2. Clone the repo and start the base infrastructure (Traefik, Portainer).
  3. Connect the backup drive.
  4. Run the full restore script:
    ./scripts/restore-all.sh
    
  5. Verify data integrity before switching DNS.