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

Collapse
Posted by Jade Rubick on
Here's what I do:

svc -d /service/safe4all-dev
restart-aolserver safe4all-dev
dropdb safe4all-dev
createdb safe4all-dev
createlang plpgsql safe4all-dev
psql -d safe4all-def -f /web/safe4all/packages/acs-kernel/sql/postgresql/postgresql.sql
psql -d safe4all-def -f /web/safe4all/packages/acs-kernel/sql/postgresql/rel-segments-create.sql
zcat safeall.dmp.gz | psql -d safe4all-dev -f -
rsync -aC --delete /web/safe4all/content-repository-content-files safe4all-dev
svc -u /service/safe4all-dev

Thanks to Michael Steigman for helping me with this. I'm going to link this in on the documentation.