Public | Automated Build

Last pushed: 7 months ago
Short Description
Daily Postgres DB backups, shipped to Amazon S3. Email notifications on every backup attempt.
Full Description

gordonchan/postgres-s3-backup

A Docker image designed to make daily backups of a Postgres database at 3pm UTC (3am NZST). Backups are stored locally on the container but are also uploaded to Amazon S3. Email notifications are delivered on every backup attempt.

backup is used to manage backups and whenever is used to create the cron job. The main backup configuration file can be found here.

This Docker image was created for my own selfish needs. It could be useful for others or be used as an example to create your own version.

Environment variables

The following environment variables are expected to be set:

Postgres

  • POSTGRES_DB
  • POSTGRES_USER
  • POSTGRES_PASSWORD
  • POSTGRES_HOST
  • POSTGRES_POST

AWS

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • S3_REGION
  • S3_BUCKET
  • S3_PATH

SMTP Email

  • MAIL_FROM
  • MAIL_TO
  • MAIL_ADDRESS
  • MAIL_PORT
  • MAIL_DOMAIN
  • MAIL_USER_NAME
  • MAIL_PASSWORD
  • MAIL_AUTHENTICATION
  • MAIL_ENCRYPTION

License

Copyright (c) 2016 Gordon Chan. Released under the MIT License. It is free software, and may be redistributed under the terms specified in the LICENSE file.

Docker Pull Command
Owner
gordonchan
Source Repository

Comments (0)