Created
August 9, 2013 08:50
-
-
Save jbub/6192139 to your computer and use it in GitHub Desktop.
postgres dump and restore data
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
# dump database dbname to dbname.dump | |
pg_dump -Fc --data-only --disable-triggers dbname > dbname.dump | |
# restore database dbname to dbname from dbname.dump | |
pg_restore -U username -h hostname.com --disable-triggers -d dbname dbname.dump |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment