Created
April 22, 2015 06:27
-
-
Save JulienSansot/357cf6760e5535bbe4fa to your computer and use it in GitHub Desktop.
dump and restore postgreSQL database
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
#dump the db : | |
#http://postgresguide.com/utilities/backup-restore.html | |
sudo -u postgres pg_dump -Fc your_db > dump.bak | |
#restore a db : | |
sudo -u postgres pg_restore --clean -d your_db -Fc dump.bak |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment