Skip to content

Small container to back up PostgreSQL databases to Amazon S3

License

Notifications You must be signed in to change notification settings

PicturePipe/psql-s3-backup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

psql-s3-backup

This build a very simple container that backs up psql databases to S3.

This containers expects the following environment variables:

  • DATABASE_NAME name of the database that should be used for identifying the backup
  • DATABASE_URL url how to connect to the database
  • BACKUP_BUCKET name of the S3 bucket were the database backup should be sent to
  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY

Restore

To restore the backup completely overwriting the current database use:

pg_restore -O -c --if-exists -x -d "${DATABASE_URL}" < backup-file.dump

About

Small container to back up PostgreSQL databases to Amazon S3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published