Last active
January 9, 2020 10:09
-
-
Save guilhermebkel/22f8b3cce07c72d3a7000d461f2b6e26 to your computer and use it in GitHub Desktop.
postgres-database-commands
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
echo "Command to make a dump of postgres database" | |
pg_dump -v -h DB_HOST -U DB_USER -d DB_NAME > DUMP_FILE.sql |
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
echo "Command to restore a dump of postgres database" | |
psql -h DB_HOST -U DB_USER -W -d DB_NAME < DUMP_FILE.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment