Public | Automated Build

Last pushed: 2 years ago
Short Description
Cron scheduled streaming upload of compressed PostgreSQL database dumps to AWS S3.
Full Description

postgres-s3-backup


Cron scheduled streaming upload of compressed PostgreSQL database dumps to AWS S3.

Supports linking: docker run --link postgres:postgres msokk/postgres-s3-backup

Based on Alpine Linux,
using s3gof3r and go-cron.

Environment variables

Required
  • AWS_ACCESS_KEY_ID - AWS S3 access key.
  • AWS_SECRET_ACCESS_KEY - AWS S3 secret key.
  • AWS_BUCKET - AWS S3 bucket.
Optional
  • SCHEDULE - go-cron pattern to define. See CRON Expression Format (default: @daily)
  • PGDATABASE - Specify a database to backup (default: not set, runs pg_dumpall)
  • PGHOST/PGPORT - Two variables which can be set to specify the usage of a different container or PostgreSQL server (meaning you aren't linking). (default: $POSTGRES_PORT_5432_TCP_{ADDR/PORT})
  • PGUSER - The database user to connect as (default: postgres)
  • NAME_PREFIX - A prefix in front of the date i.e. jira-data-dir-backup. Can be prefixed with folder. (default: database-archive)
  • COMPRESSION_LEVEL - The compression level for gzip to use (0-9). (default: 9)
  • AWS_ENDPOINT - AWS endpoint to configure, i.e s3-eu-central-1.amazonaws.com for Frankfurt (default: s3.amazonaws.com).
Docker Pull Command
Owner
msokk
Source Repository

Comments (0)