Forum OpenACS Q&A: Re: pg_dump and pg_restoring from production to dev

Posted by Stan Kaufman on
Jade, does that work? It usually isn't subtle; either it does or it doesn't.

For what it's worth, this is what I do:

Edit all the \connect statements out of the dump file. I don't fundamentally understand what purpose they serve, but depending on how you set your permissions, they can result in only partial recreation of the db. And it will fail silently without showing in the error log.

Use this syntax -- see

psql safe4all-dev < safe4all.dmp 2> errors.txt

This works fine for me anyway.