Backup and restore your PostgreSQL docker volumes to AWS S3 Buckets!
1.1K
This is based on dockup-mongo but for postgres. Docker image to backup/restore your PostgreSQL DB to AWS S3. Builds upon dockup.
This Docker image uses pg_dump to create a PostgreSQL database dump and backup or restore it with dockup.
Please see the dockup repository for extended information on configuration options, for instance on how to configure encryption with GnuPG.
The following PostgreSQL specific configuration options have been added:
db)5432)postgres)postgres)Usually you will link your PostgreSQL container to the dockup container.
The following dockup environment variables should not be overriden if using the specialised PostgreSQL (dockup-postgres) image:
This is what a postgres and backup service might look like in docker-compose.yaml. Note the dockup-postgres specific variables in addition to others needed by dockup
backup:
links:
- postgres
environment:
- POSTGRES_PASS=passw0rd
- POSTGRES_HOST=postgres
- POSTGRES_DB=postgres
- AWS_ACCESS_KEY_ID=aws_key_id
- AWS_DEFAULT_REGION=us-east-1
- AWS_SECRET_ACCESS_KEY=aws_secret_key
- BACKUP_NAME=test
- PATHS_TO_BACKUP=/dockup/pgdump
- RESTORE=false
- S3_BUCKET_NAME=test-name
- S3_FOLDER=backups/
image: dockup-postgres:latest
postgres:
environment:
- POSTGRES_PASSWORD=passw0rd
image: postgres:latest
ports:
- 5432:5432
volumes:
- /var/lib/postgresql/data
Content type
Image
Digest
Size
63.6 MB
Last updated
over 7 years ago
docker pull mimicmobile/dockup-postgres