Skip to content

A sidecar docker container for backing up a PostgreSQL database with restic.

Notifications You must be signed in to change notification settings

floot/docker-postgres-restic-backup

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Docker Postgres Restic Backup

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.

Environment variables

  • 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 host
  • PGUSER: PostgreSQL user name
  • PGPASSWORD: PostgreSQL user password
  • PGDATABASE: PostgreSQL database to backup
  • RESTIC_REPOSITORY: Restic repository name
  • RESTIC_PASSWORD: Restic repository password
  • AWS_ACCESS_KEY_ID: S3 Access ID
  • AWS_SECRET_ACCESS_KEY: S3 Secret Key

About

A sidecar docker container for backing up a PostgreSQL database with restic.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 89.2%
  • Dockerfile 10.8%