Forum OpenACS Q&A: Re: Re: Backup and Restore of Postgresql

Collapse
Posted by Steve Manning on
Dave

Its been a while but IIRC there where two problems the first is that creating a default db gave errors with restoring pgplsql as it alreay exists in template1 and the other more fundamental problem is that a plain dump of schema and data together didn't restore in the correct sequence which gave errors if functions weren't present for triggers et al. This is referenced in the docs https://openacs.org/doc/openacs-5-1/snapshot-backup.html where it suggests runnning the object init script first:

Because of a bug in Postgres backup-recovery, database objects are not guaranteed to be created in the right order. In practice, running the OpenACS initialization script is always sufficient to create any out-of-order database objects.

Are you saying that you can use pg_dump and then suck the file back into a newly created db without error?

- Steve