Mon Jan 24 18:37:06 PST 2005
- Previous message: [Slony1-general] Backing up a PostgreSQL database that is being replicated using Slony
- Next message: [Slony1-general] Backing up a PostgreSQL database that is being replicated using Slony
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Jan 24, 2005, at 1:23 PM, Fiel Cabral wrote: > Has anyone backed up and restored a PostgreSQL database that's being > replicated using Slony? I just had the need to restore a pg_dump into a development box from the live server to do some extensive statistics. Here's what I did: create dump: pg_dump -v -U postgres -Fc -f mm.dump database from the dump, generate a catalog: pg_restore -l mm.dump > mm.list edit mm.list to eliminate any slony-related stuff: the schemas, the functions, the triggers, etc. Basically, if it was not part of my application, out it went. Restore using the resulting catalog: pg_restore -v -U postgres -L mm.list -d database mm.dump This assumes that slony did not have to add any primary key columns to your tables. It is better to have them already defined in your schema before setting up slony.
- Previous message: [Slony1-general] Backing up a PostgreSQL database that is being replicated using Slony
- Next message: [Slony1-general] Backing up a PostgreSQL database that is being replicated using Slony
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list