docs(ops): restore runbook, off-host backups, and media backup (#80) #172
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/80-restore-runbook"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Scheduled DB backups worked, but the story stopped there: no documented restore procedure, the
backupsvolume sat on the same disk aspostgres_data, and themediavolume (uploaded images — permanent user data) was never backed up. An operator facing a dead host would have to improvisepg_restoreflags and service ordering — and discover all media gone.Changes (
docs/OPERATIONS.md, Backups section)pg_restore --clean --if-exists --no-ownerof the custom-format dump via a throwaway backend container (which has bothpg_restoreand thebackupsvolume) against the runningdb, incl. the fresh-host path (bring updbonly soinit.shcreates roles first) → start ordering (the one-shotmigrateruns first) → verification (alembic current==heads, app boots, spot-check query).rsync/rclonecron on a second host (credentials stay off the app host), with thedocker volume inspectmountpoint hint.mediavolume backup + restore — dependency-freetarvia a throwaway container, shipped off-host with the DB dumps.audio_tempis transient scratch, deliberately not backed up.Approach
Implemented as documented operator procedures — the issue explicitly permits documenting the off-host pattern and a separate volume-backup step. No application code changes, so nothing here can regress the running system.
Verification
Markdown structure checked (balanced headings + fenced code blocks). Docs-only — no CI job exercises OPERATIONS.md content.
Closes #80
🤖 Generated with Claude Code