Created
October 2, 2016 16:02
-
-
Save Istar-Eldritch/7e5285f422266d51990343828ca475a1 to your computer and use it in GitHub Desktop.
Postgres Docker data migrations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
createdb -Upostgres $POSTGRES_DB | |
gunzip -c dump.gz | psql -Upostgres $POSTGRES_DB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker cp dump.gz $DB:/dump.gz | |
docker cp backup.sh $DB:/backup.sh | |
docker exec $DB /bin/bash backup.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment