All Stories
2-5-database-backup-point-in-time-recoveryDoneEpic 2.5
Story 2.5: Database Backup & Point-in-Time Recovery
Status: done
Tasks
- Task 1: Verify Supabase Backup Configuration (AC: #1, #2)
- 1.1: Confirm Supabase Pro plan includes daily backups
- 1.2: Verify 7-day PITR is enabled in Supabase Dashboard
- 1.3: Document current backup schedule and retention settings
- 1.4: Screenshot backup configuration for documentation
- Task 2: Create Disaster Recovery Runbook (AC: #3)
- 2.1: Create `docs/runbooks/disaster-recovery.md` file
- 2.2: Document restore procedure:
- 2.3: Document rollback procedure if restore fails
- 2.4: Add emergency contact list and escalation path
- 2.5: Include verification queries (bet count, user count, latest transaction)
- Task 3: Implement Backup Monitoring (AC: #4)
- 3.1: Add backup status to `/health` endpoint response
- 3.2: Query Supabase API or table for last backup timestamp
- 3.3: Create `backup_health_log` table to track backup verifications
- 3.4: Implement backup size monitoring logic
- 3.5: Configure alerting for backup failures (via existing Sentry or new channel)
- Task 4: Execute Restore Drill (AC: #5) **[MANUAL - Deferred to Platform Operator]**
- 4.1: Create test Supabase project for restore validation
- 4.2: Execute point-in-time restore to 24 hours ago
- 4.3: Run data integrity verification queries
- 4.4: Measure and document actual RTO (target <2 hours)
- 4.5: Verify zero data loss for bets (compare counts)
- 4.6: Document drill results and any issues encountered
- Task 5: Schedule Quarterly Drills (AC: #5) **[MANUAL - Deferred to Platform Operator]**
- 5.1: Add quarterly restore drill to team calendar
- 5.2: Create restore drill checklist template (completed in runbook)
- 5.3: Document drill results format for tracking (completed in runbook)
- Task 6: Testing and Validation (AC: #1-5)
- 6.1: Verify health endpoint returns backup status correctly
- 6.2: Test alert triggers with simulated backup failure
- 6.3: Validate runbook steps with walkthrough
- 6.4: Review and approve runbook with stakeholders **[MANUAL]**
Progress
Tasks4/6
Acceptance Criteria0
Total Tasks6