Created
February 6, 2019 08:57
-
-
Save leeeandroo/ca10d8dfee0e8734bb10836ebd2d35c4 to your computer and use it in GitHub Desktop.
Backup PSQL from docker container
This file contains 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
Backup: | |
docker exec -t -u postgres your-db-container pg_dumpall -c > your_dump.sql | |
Restore: | |
cat your_dump.sql | docker exec -i your-db-container psql -U postgres |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment