Restore a postgres db from a back made with A fork of schickling's postgres-backup-s3
103
A fork of https://github.com/schickling/dockerfiles/tree/master/postgres-restore-s3 that additionally supports:
PRE_SQL: a one liner SQL statement to run before the db backup is restored. FILE: specify the filename to get from your S3 bucket.
$ docker run -e S3_ACCESS_KEY_ID=key -e S3_SECRET_ACCESS_KEY=secret -e S3_BUCKET=my-bucket -e S3_PREFIX=backup -e POSTGRES_DATABASE=dbname -e POSTGRES_USER=user -e POSTGRES_PASSWORD=password -e POSTGRES_HOST=localhost -e FILE=some.backup.sql.tar.gz -e PRE_SQL="CREATE USER user WITH PASSWORD 'password'; CREATE DATABASE debe; GRANT ALL PRIVILEGES ON DATABASE debe TO user;" elexy/postgres-restore-s3
Content type
Image
Digest
Size
32.2 MB
Last updated
about 9 years ago
docker pull elexy/postgres-restore-s3:0.1