Skip to content

Security Documentation

Disaster Recovery Runbook

This page documents Aegis Firma's disaster recovery objectives, backup procedures, and recovery steps. Last reviewed: 2026-04-18.

Recovery Objectives (SEC-076)

RTO — Recovery Time Objective

4 hours

Maximum acceptable downtime before service is restored

RPO — Recovery Point Objective

24 hours

Maximum data loss window (last successful backup)

Backup Architecture

ComponentProviderFrequencyRetentionRecovery Method
PostgreSQL databaseSupabaseDaily WAL + 7-day PITR30 daysSupabase dashboard → Restore point
File storage (evidence, docs)Supabase StorageSupabase replicationUntil deleted by userSupabase dashboard → Object recovery
Application codeGitHubEvery pushIndefinitegit clone + deploy from tag
Cloudflare Workers/PagesCloudflarePer deployment90 daysCloudflare dashboard → Rollback deployment
Environment secretsCloudflare + Supabase vaultManual rotation logDocumented in 1Password vaultRestore from 1Password + re-deploy

Backup Restore Test Log (SEC-077)

Backup restore tests are performed quarterly. Results are documented here. A test consists of restoring to a staging environment and verifying data integrity.

DateComponentRestore PointDurationResultTested By
2026-04-01PostgreSQL2026-03-31 00:00 UTC~12 minPassOwner
Next scheduled: Q3 2026 (July 1–15)

Data Loss Scenario Playbook (SEC-078)

Scenario: Accidental row/table deletion by user

  1. 1.Identify which table and approximate time of deletion from audit trail
  2. 2.Open Supabase dashboard → Database → Backups → Point-in-Time Recovery
  3. 3.Create a branch restore to 5 minutes before deletion
  4. 4.Export affected rows from branch, verify integrity
  5. 5.INSERT recovered rows into production (with manual review)
  6. 6.Notify affected users within 1 business day

Scenario: Full database corruption / Supabase outage

  1. 1.Confirm Supabase status page (status.supabase.com)
  2. 2.If Supabase outage: monitor; estimated recovery per Supabase SLA (99.9%)
  3. 3.If internal corruption: initiate full PITR restore to last clean checkpoint
  4. 4.Stand up staging environment to validate restore before promoting
  5. 5.Update status page at /status with incident details
  6. 6.Post-incident: enable WAL archiving verification

Scenario: Cloudflare Pages deployment failure

  1. 1.Go to Cloudflare dashboard → Pages → aegisfirma → Deployments
  2. 2.Identify last successful deployment
  3. 3.Click "Rollback to this deployment"
  4. 4.Verify production URL returns 200
  5. 5.Investigate failed deployment logs; fix in code; re-deploy