Skip to content

Backup & Restore

Runs automatically at 4:15am via cron.

Terminal window
# Manual run
bash ~/Backups/sanctum-backup.sh
  • OpenClaw config (~/.openclaw/)
  • Sanctum config (~/.sanctum/)
  • All LaunchAgent plists
  • SSH keys and config
  • 6 project directories
  • TTS models and voice files
  • Crontab, Homebrew package lists
  • Docker container state and tool versions
iCloud/Backups/daily/YYYY-MM-DD/mac/

7-day retention (older backups auto-pruned).

Sensitive files (SSH keys, secrets) are encrypted with AES-256-CBC using a key stored in macOS Keychain (sanctum-backup).

Weekly automated snapshot (Sundays 3am):

Terminal window
bash ~/Backups/vm-snapshot.sh

Creates compressed copies of the VM disk image and EFI vars:

  • iCloud/Backups/VM/qcow2.zst
  • iCloud/Backups/VM/efi_vars.fd.zst

Uses live copy (no VM suspend) with SSH sync before snapshot.

7-phase process:

  1. Homebrew — Restore package list, brew install
  2. Dotfiles & SSH — Restore keys, shell config
  3. App configs — OpenClaw, Sanctum, HA
  4. Projects — Restore git repos
  5. Ollama — Re-pull models (not backed up due to size)
  6. Docker — Restore container configs
  7. LaunchAgents — Restore plists, bootstrap services
Terminal window
bash ~/Backups/sanctum-restore.sh
ScriptPurpose
sanctum-backup.shFull daily Mac backup
sanctum-restore.shMulti-phase restore
vm-snapshot.shWeekly VM disk snapshot
rotate-secrets.shMonthly secret rotation