Skip to main content
deploy/backup.sh dumps Postgres in pg_dump custom format, compressed and restorable table by table, keeping 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, to object storage or another host, 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.
Restore one dump before you need to. An untested backup has not been shown to work.