Skip to content

Instantly share code, notes, and snippets.

@denitram
Created June 1, 2012 12:56
Show Gist options
  • Save denitram/2851946 to your computer and use it in GitHub Desktop.
Save denitram/2851946 to your computer and use it in GitHub Desktop.
Postgresql --- Restore a database
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