[Infra] Set up nightly PostgreSQL backups to S3
Task Checklist
- Create a private S3 bucket with a 14-day lifecycle rule
- Add a nightly job (02:00 UTC) that runs pg_dump and uploads the compressed dump
- Give the job write-only credentials for the bucket
- Send an alert to the team channel when a backup fails or is missing
- Restore the latest backup into a scratch database to verify it
Notes
- Dependencies: AWS account access, alerting channel webhook
- Testing required: one successful restore before closing the ticket