Created
April 2, 2024 17:46
-
-
Save doyle/9b998f9c93b9be9d82e492ad6f14f16c to your computer and use it in GitHub Desktop.
Dump and load a postgres database in a docker container
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
docker compose exec database pg_dump -U <user> -W <datbase> > database.sql | |
docker compose exec -T database psql -U <user> <database> < database.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment