Staging Deployment

Backup And Restore Runbook

Backups are mandatory before staging migrations and before any risky data operation.

Use this when...

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.dump

Do 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.dump

This command is documentation only; Sprint 23 does not automate restore.

Restore Drill Checklist

  1. Confirm approval and target environment.
  2. Confirm backup file integrity.
  3. Restore into a non-production test target first when possible.
  4. Run migration status.
  5. Run /api/ready.
  6. Run login and smoke checks.
  7. 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