ワンクリックで
disaster-recovery
Full Pi disaster recovery -- backup verification, restore workflows, SD card imaging, and migration checklists
メニュー
Full Pi disaster recovery -- backup verification, restore workflows, SD card imaging, and migration checklists
Write Prometheus alerting rules and configure Alertmanager routing for home lab notifications.
Write and run Ansible playbooks for multi-node home lab provisioning and configuration management.
Configure and manage restic backups including scheduling, verification, and disaster recovery.
Let's Encrypt, self-signed certs, renewal automation, NPM cert integration
Manage AdGuard Home DNS filtering, blocklists, local DNS records, and query log analysis.
Manage multi-file Docker Compose deployments on a Raspberry Pi home lab server.
| name | disaster-recovery |
| description | Full Pi disaster recovery -- backup verification, restore workflows, SD card imaging, and migration checklists |
| tools | ["homelab_backupList","homelab_backupRestore","homelab_backupDiff","homelab_volumeBackup","homelab_backupStatus","homelab_backupRun"] |
| standards-version | 1.10.0 |
Guide the user through full Raspberry Pi disaster recovery, including backup verification, snapshot restore, Docker volume recovery, SD card imaging, and multi-node migration.
homelab_sshTest)sudo apt install restic)HOMELAB_BACKUP_REPO (default /mnt/backup/restic)Optional:
homelab_backupStatus to check the latest restic snapshots and confirm the backup timer is running.homelab_backupList to get the full snapshot inventory. Filter by --tag docker-volume to see volume-specific snapshots.homelab_backupDiff between the two most recent snapshots to verify incremental changes look reasonable (no unexpected large deletions).Prerequisites:
sudo apt install restic)Steps:
sudo restic -r /mnt/backup/restic snapshots --latest 1
Restore the full system backup to a staging directory using homelab_backupRestore with snapshot: "latest", target: "/tmp/restore", confirm: true.
Copy restored files to their final locations:
sudo rsync -avh /tmp/restore/opt/homelab/ /opt/homelab/
sudo rsync -avh /tmp/restore/etc/ /etc/ --exclude=fstab --exclude=hostname
Restore Docker volumes individually using homelab_backupRestore with include: "/var/lib/docker/volumes/VOLUME_NAME".
Restart Docker and bring stacks up:
sudo systemctl restart docker
cd /opt/homelab/docker && docker compose -f compose.base.yml up -d
homelab_serviceHealth.To restore a single Docker volume:
homelab_backupRestore with:
snapshot: the snapshot ID containing the volume data (use homelab_backupList with tag: "docker-volume" to find it)target: / (restore to original paths)include: /var/lib/docker/volumes/VOLUME_NAME/_dataconfirm: trueFor bare-metal backup (not restic), guide the user through:
# On a separate machine, create an image of the SD card
sudo dd if=/dev/sdX of=pi-backup.img bs=4M status=progress
# Compress it
xz -9 pi-backup.img
To restore:
xz -d pi-backup.img.xz
sudo dd if=pi-backup.img of=/dev/sdX bs=4M status=progress
When moving to new hardware:
homelab_backupRun with confirm: truehomelab_backupList (confirm latest snapshot timestamp)/etc/fstab if disk layout changedhomelab_serviceHealthUser: My Pi's SD card died. I have restic backups on an external drive. How do I get everything back?
Assistant:
First, let me check what backups are available.
Calls homelab_backupList
You have 42 snapshots. The latest is from 2 hours ago -- that's good.
Let me check what changed in the last two snapshots.
Calls homelab_backupDiff with the two most recent snapshot IDs
Only 12 config files changed -- normal daily delta.
Here's the plan:
/mnt/backuphomelab_backupRestore with snapshot: "latest", target: "/tmp/restore", confirm: true/opt/homelab/ back into placeWant me to walk through each step?
homelab_backupRun daily via systemd timer (already configured)homelab_volumeBackup before major upgrades