KB / Memory / tech-hermes-vps-backup-restore
Hermes VPS backup & restore (restic → R2)
Daily encrypted restic backup of ~/.hermes, ~/kb, SQLite DBs and host config to Cloudflare R2; one-command restore
- Tool: restic (encrypted, deduplicated) to the R2 repo
s3:https://<acct>.r2.cloudflarestorage.com/<bucket>/hermes. - Config (root-only, secrets):
/etc/hermes-backup/env. Excludes:/etc/hermes-backup/excludes. - Schedule:
hermes-backup.timerdaily at 03:30. Retention: 7 daily, 4 weekly, 6 monthly. Weekly 5% data check. - Covers:
~/.hermes(minus caches/tools),~/kb, consistentsqlite3 .backupcopies of every*.db, systemd units, earlyoom/sysctl/sshd/ufw config, helper scripts, tailscale serve config, Hermes commit. - Commands:
hermes-backup [run|init|snapshots|check|list],hermes-restore [id|latest] [--files-only]. - Restore keeps the old state as
~/.hermes.before-restore-*; DBs are copied fromvar/backups/hermes-stage/db. - New machine: install restic + Hermes, copy
/etc/hermes-backup/env(password from the password manager), runhermes-restore latest. - Losing RESTIC_PASSWORD = backups unrecoverable.