A docker image to pgdumpall, compress, encrypt, and send off a database backup to s3
2.6K
Taken from siomiz/postgresql-s3, this image has the necessary utilties for you to perform continuous postgres backups to S3. The idea is here is to provide an easy ready-to-go way to dump an entire postgresql database, compress it, encrypt it, and push it to Amazon s3.
Please check the version/tag you pull of this image. If a version mismatch occurs, pg_dumpall will not execute!
Without going through and providing all the required env vars, here is a quick docker run line for getting up and running with this container.
docker run --link postgres:postgres inanimate/postgres-s3-archive
Note that the alias/name used to identify your linked postgres container must actually be postgres!
AWS_ACCESS_KEY_ID - AWS S3 access key.AWS_SECRET_ACCESS_KEY - AWS S3 secret key.BUCKET - AWS S3 bucket (and folder) to store the backup. i.e. s3://herpderpbucket/folderSYMMETRIC_PASSPHRASE - The gpg symmetric passphrase to use to encrypt your file.PGHOST/PGPORT - Two variables which can be set to specify the usage of a different container or postgres server (meaning you aren't linking). (default: HOST and PORT of the container you link.)PGUSER - The database user to connect as (default: postgres)We assume the user provided has full access without a password needed. Please make sure this exists and your server allows this user to login from the same network segment.
TIMEOUT - How often perform backup, in seconds. (default: 86400)NAME_PREFIX - A prefix in front of the date i.e. jira-data-dir-backup (default: database-archive)GPG_COMPRESSION_LEVEL - The compression level for gpg to use (0-9). (default: 0; not recommended since we're using xz)XZ_COMPRESSION_LEVEL - The compression level for xz (lzma2) to use (0-9). (default: 9; this is the best compression level)CIPHER_ALGO - The cipher for gpg to utilize when encrypting your archive. (default: aes256)EXTENSION - The extension to use for the backup file i.e. tgz,tar.xz,bz2 (default: .psql.xz.gpg)AWSCLI_OPTIONS - Provide some arguments to awscli (default: --sse) See here for possibilities.All other aws-cli variables are also supported.
Content type
Image
Digest
sha256:87d5475bf…
Size
124.4 MB
Last updated
over 9 years ago
docker pull inanimate/postgres-s3-archive