Apr 16, 2014

Snippets for backup/deploy Postgres DB

Create dump or schema definition:
pg_dump --no-owner --no-acl -Fc db > db.dump
pg_dump --no-owner --no-acl --schema-only db > db.sql
Restore, deploy:
pg_restore -Fc -C db.dump | psql

No comments:

Post a Comment

New comment