Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

HowGood/docker-backup-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

1 Commit

Repository files navigation

Backup Database Container

This contains the scripts for backing up and restoring a Postgres database using gpg to encrypt it, and AWS S3 for storage.

Usage

To create a database backup, supply the required environment variables and execute the docker image.

docker run --rm -it \
 -e PGHOST=localhost \
 -e PGPORT=5432 \
 -e PGUSER=postgres \
 -e PGPASSWORD=s3cr3t_p4ssw0rd \
 -e S3_BUCKET=backups.example.com \
 -e GPG_PASSPHRASE=p4ssw0rd \
 howgood/backup-db:latest

To download and decrypt a database backup, supply the required environment variables again, and execute the docker image with the restore script as the command.

docker run --rm -it \
 -e PGHOST=localhost \
 -e PGPORT=5432 \
 -e PGUSER=postgres \
 -e PGPASSWORD=s3cr3t_p4ssw0rd \
 -e S3_BUCKET=backups.example.com \
 -e GPG_PASSPHRASE=p4ssw0rd \
 -v "$(pwd):/backup/" \
 howgood/backup-db:latest \
 /usr/local/bin/download-backup.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /