# 60 — Postgres backups (pg_dump cron) ## Goal Nightly compressed pg_dump of `famapp-db` (and `authentik-db`) to a host volume, with a retention policy. ## Depends on - 05 ## Scope - `deploy/backups/` directory committed. - Add a `famapp-backup` service to compose: small Alpine container with `postgresql-client` + `cron` + a script that runs `pg_dump -Fc` against both DBs into `/backups//.dump`. - Retention: keep last 14 daily, last 8 weekly, last 6 monthly. Pure shell, no fancy tooling. - Document restore procedure in `deploy/backups/README.md`. ## Out of scope - Off-site replication (Matt's call; he can rsync `/backups` elsewhere). - Encryption at rest (handled at the disk layer). ## Acceptance criteria - [ ] After a day, dump files exist for both DBs. - [ ] `restore.sh ` script exists and works against a fresh DB. - [ ] Retention script keeps the right counts.