PaaS Backup and Restore Policy
Date: 2026-02-18 Scope:si paas state roots and Supabase self-hosted backup workflows
Owner: Codex
1. Objective
Define mandatory backup and restore policy for:- Private
si paasstate. - Supabase self-hosted PostgreSQL backups operated through WAL-G.
- Databasus metadata-sidecar support (without public host-web exposure).
2. Protected data (per PaaS context)
Back up from<state_root>/contexts/<context>/:
config.jsontargets.jsondeployments.jsonaddons.jsonbluegreen.jsonwebhooks/mappings.jsonalerts/policy.jsonevents/deployments.jsonlevents/alerts.jsonlevents/audit.jsonl
releases/metadata (for faster recovery)cache/(only for forensics)
3. Explicit exclusions
Never include in PaaS state backup bundles:vault/secrets.env- Any plaintext secret exports or debug dumps
- Runtime data volumes copied outside backup policy controls
4. Supabase backup contract
si defines the supabase-self-hosted backup profile:
- Recommended addon packs:
supabase-walg,databasus - Default run service:
supabase-walg-backup - Default restore service:
supabase-walg-restore - Required env:
WALG_S3_PREFIX,WALG_AWS_ACCESS_KEY_ID,WALG_AWS_SECRET_ACCESS_KEY,WALG_AWS_ENDPOINT
5. Backup frequency and retention
Minimum baseline:- Hourly WAL-G incremental backup push for active apps.
- Daily verified restore test in non-production target.
- Retention: 7 daily + 4 weekly + 3 monthly snapshots.
- Immutable offsite copy for daily full snapshot lineage.
6. Backup procedure (reference)
Run backup:7. Restore procedure (reference)
Restore latest:si paas doctor --jsonreturnsok=true.si paas app status --app <slug> --jsonreflects expected release.si paas events list --limit 20 --jsonshows restore and verification trail.- App-level health checks pass before production writes resume.
8. Governance requirements
- Backups must be encrypted at rest and in transit.
- Backup artifacts must stay outside git workspaces.
- Databasus must remain private-only (no host web port exposure).
- Every restore must log:
- backup id/checksum
- operator identity
- start/end timestamps
- post-restore validation outputs
- Quarterly restore drills are mandatory for production contexts.
9. Failure modes and actions
- Missing or unverified backup id/checksum:
- block restore
- use last verified snapshot
- Failed post-restore doctor checks:
- block deploy/secret mutations
- resolve contamination and rerun checks
- Vault mismatch after restore:
- reconcile via vault workflows only
- never inject plaintext secrets into PaaS state roots
