Last active
October 5, 2021 17:33
-
-
Save PraneethKarnena/a47fc6dd58e320cfbb2163d366b6d4b5 to your computer and use it in GitHub Desktop.
PostgreSQL database dump/restore 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
pg_dump -h 127.0.0.1 -U db_user -p 5432 -d db_name -O -x > dump.bak | |
psql -d db_name -U db_user < dump.bak | |
psql --host=127.0.0.1 --port=5432 --username=db_user --password --dbname=db_name < dump.bak |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment