Staging Deployment
Backup And Restore Runbook
Backups are mandatory before staging migrations and before any risky data operation.
Use this when you need a repeatable operational procedure.
Backups are mandatory before staging migrations and before any risky data operation.
Backup
Use the staging database provider backup feature or pg_dump with credentials from the secure staging secret store:
pg_dump "$DATABASE_URL" --format=custom --file=submicron-staging-before-deploy.dumpDo not commit backup files.
Restore
Restores require human approval. Verify the target database first and never restore over the wrong environment.
pg_restore --clean --if-exists --dbname="$DATABASE_URL" submicron-staging-before-deploy.dumpThis command is documentation only; Sprint 23 does not automate restore.
Restore Drill Checklist
- Confirm approval and target environment.
- Confirm backup file integrity.
- Restore into a non-production test target first when possible.
- Run migration status.
- Run
/api/ready. - Run login and smoke checks.
- Document outcome.
File/object storage is not implemented yet; add storage backup steps before introducing file uploads.
Developer Details
- Source
- apps/docs/content/staging-deployment/backup-restore.md
- Owner
- Platform / Operations
- Status
- Current
- Module
- Staging Deployment
- Related route
- /api/health