Skip to content

Simple docker image that uses pg_dump to backup a postgres database and uploads it to S3-compatible storage using s3cmd.

License

Notifications You must be signed in to change notification settings

ephemerecreative/pg-backup-s3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pg-backup-s3

Docker Cloud Automated Build Docker Cloud Build Status

NOTE: We are trying this out in one of our projects, but haven't tested it in a real production environment.

Simple utility to backup a Postgres database to S3-compatible storage.

Sample k8s configuration.

Environment Variables

Environment Variable Name Environment Variable Description
S3_ENDPOINT The endpoint of the S3-compatible service you would like to use.
S3_REGION The region of the S3-compatible service you would like to use.
S3_ACCESS_KEY_ID Your S3 access key ID.
S3_SECRET_ACCESS_KEY Your S3 secret access key.
S3_BUCKET Your S3 bucket name.
BUCKET_PATH The path within the bucket that you would like to save the backups in.
PGUSER The postgres database user.
PGPASSWORD The postgres database password.
PGHOST The postgres database host.
PGPORT The postgres database port.
PGDATABASE The postgres database name.
PG_DUMP_FLAGS pg_dump is used to generate the backups. By default we export using -Fc, but you can replace these flags with your preferred configuration.
OTHER_S3CMD_FLAGS We use s3cmd to upload the backup file. If you would like to use any other flags to modify the command, add them with this variable.

About

Simple docker image that uses pg_dump to backup a postgres database and uploads it to S3-compatible storage using s3cmd.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •