Created
June 1, 2012 12:56
-
-
Save denitram/2851946 to your computer and use it in GitHub Desktop.
Postgresql --- Restore a database
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
sudo -u postgres psql -U postgres < intspecinf_ont_schemas.dmp | |
sudo -u postgres psql -U postgres intspecinf_ont < intspecinf_ont_dataonly.dmp | |
# storybuilder example - dump from localhost & restore to remote server | |
* dump (incl. create tables) | |
/opt/postgresql/91/bin/pg_dump -h localhost -Udba_dubourgm --role=dba -Fp --no-tablespaces --no-owner --no-privileges storybuilder_tst > sb_20121128.dmp | |
* drop & recreate public schema | |
* restore | |
/opt/postgresql/91/bin/psql -Usb_acc_owner -h pgl01-ext-p.rivm.nl -d storybuilder_acc -f sb_20121128.dmp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment