Forum OpenACS Q&A: pg_dump question

Collapse
Posted by David Kuczek on
I have one production server and one development server. Today I manually
synced those two, because I wanted to check out pg_dump... So I did:

pg_dump -f dumpfile.dmp MyDatabase (on production)

psql -d MyDatabase -f dumpfile.dmp (on dev)

On dev I got some error messages that told me something about
integrity constraints, duplicate inserts, procedure exists with same
arguments etc.

My Question is whether I have to dropdb MyDatabase and createdb
MyDatabase before I reload a dump OR ignore the error messages?

Collapse
Posted by Ken Ninh on
pg_dump gives you a full backup of the db.  When restoring the db,
I would dropdb, createdb, then restore with psql.