Last active
January 31, 2020 14:06
-
-
Save nmenag/09c3c60162ecf9fa0b12b762204da0df to your computer and use it in GitHub Desktop.
restore a postgres backup for a Docker app
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
# pass the backup to container | |
docker cp latest.dump quincename_db_1:/var/lib/postgresql/data | |
# exec backup | |
docker exec quincename_db_1 pg_restore --no-owner --verbose --clean --no-acl -U postgres -d quincename_development /var/lib/postgresql/data/latest.dump | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment