Runbook: Backup & Restore (DR)
Synced read-only from
/home/synnet/synvirt-platform/docs-internal/runbooks/backup-restore.md. Edit at the source, not here.
Runbook: Backup & Restore (DR)
Section titled “Runbook: Backup & Restore (DR)”Status: draft for M8. The restore path MUST be tested before launch.
What to back up
Section titled “What to back up”| Asset | Method | Destination |
|---|---|---|
| Postgres (per DB) | pg_dump per database, scheduled |
off-server (offsite) |
| Host volumes | Veeam (filesystem level) | per existing ops |
| Discourse uploads | included in its volume/backup | offsite |
| Payload media | local uploads dir (web app volume) — filesystem backup | offsite |
| Keycloak realm | exported JSON in repo (infra/keycloak/) |
git |
Per-database dump (example)
Section titled “Per-database dump (example)”for db in portal payload keycloak discourse; do docker compose -f infra/compose/compose.yaml exec -T postgres \ pg_dump -U "$POSTGRES_USER" -Fc "$db" > "backup/${db}-$(date +%F).dump"done# ship backup/ offsite (rsync/rclone to external target)Restore a single database
Section titled “Restore a single database”# recreate role/db if needed (infra/postgres/init runs only on first boot)docker compose -f infra/compose/compose.yaml exec -T postgres \ pg_restore -U "$POSTGRES_USER" -d portal --clean --if-exists < backup/portal-YYYY-MM-DD.dumpMigratability note
Section titled “Migratability note”Because each service owns its database, a single restore moves exactly one service’s data — no shared-schema untangling. Same dumps can seed a dedicated data host during the single→multi-host split.
Pre-launch checklist
Section titled “Pre-launch checklist”- Scheduled
pg_dumpjob verified (files land offsite) - Payload media (uploads dir) covered by the filesystem backup
- Full restore rehearsed into a scratch environment
- Recovery time + steps documented here