A sidecar docker container that backups a PostgreSQL database via restic to an S3-compatible storage.
The setup is surprisingly simple:
The docker image is based on alpine and executes the backup
script daily via alpine's crond
service.
NOTIFY_URL
: URL that will be sent a notification to, after the whole backup process ends
The following environment variables have a mutually exclusive *_FILE
counterpart that can be set to a path to a Docker secret.
PGHOST
: PostgreSQL server hostPGUSER
: PostgreSQL user namePGPASSWORD
: PostgreSQL user passwordPGDATABASE
: PostgreSQL database to backupRESTIC_REPOSITORY
: Restic repository nameRESTIC_PASSWORD
: Restic repository passwordAWS_ACCESS_KEY_ID
: S3 Access IDAWS_SECRET_ACCESS_KEY
: S3 Secret Key