Skip to main content
deploy/backup.sh dumps Postgres in pg_dump custom format — compressed and restorable table by table — and keeps 14 days. Run it from cron on the host:
Tune it with BACKUP_DIR and BACKUP_KEEP_DAYS.

Restoring

Get the dump off the machine

A backup on the same disk as the database is not a backup.
Add a step that copies the dump elsewhere — object storage, another host, anywhere — and consider encrypting it on the way out:
Everything that matters lives in Postgres and your object storage. The containers and Redis are disposable. The dumps are not.
Test one restore before you need it. A backup you have never restored is a hypothesis, not a backup.