Skip to content

hyperboloide/backup-postgres

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

backup-postgres

A simple Docker container to create and encrypted backup of PostgreSQL to S3.

Backup PostgreSQL


docker run --rm \
        -v ~/.aws:/aws \
        --link postgres:postgres \
        -e BUCKET=s3://bucket.example.com \
        -e ENC_KEY=encryption_string \
        -e PGHOST=postgres \
        -e PGUSER=user \
        -e PGPASSWORD=passwd \
        hyperboloide/backup-postgres \
        backup

Restore PostgreSQL

docker run \
        --rm -ti \
        -v ~/.aws:/aws \
        --link postgres-restore:postgres \
        -e BUCKET=s3://bucket.example.com \
        -e ENC_KEY=encryption_string \
        -e PGHOST=postgres \
        -e PGUSER=user \
        -e PGPASSWORD=passwd \
        hyperboloide/backup-postgres \
        restore

About

A simple Docker container to backup PostgreSQL to S3.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published