Skip to content

Runbook: Backup & Restore (DR)

Synced read-only from /home/synnet/synvirt-platform/docs-internal/runbooks/backup-restore.md. Edit at the source, not here.

Status: draft for M8. The restore path MUST be tested before launch.

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
Terminal window
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)
Terminal window
# 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.dump

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.

  • Scheduled pg_dump job 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