You need to use a temporary table of content of your dump excluding these
trigger using grep
Example
1) Generate backup.dump with the
pg_dump -Fc -f backup.dump --schema=myschema1 --schema=myschema2 -hlocalhost
-p5432 .....
2) Use flag l to read the table of contents of your backup.dump
Let suppose that your Slony schema is named 'myslonycluster' then
pg_restore -l backup.dump | grep -v '_myslonycluster' > safe.toc
3) Now you can restore your two schemas using -L flag
pg_restore -L safe.toc -d your_database backup.dump
David.
________________________________
De : Brian Fehrle <[email protected]>
À : "[email protected]" <[email protected]>
Envoyé le : Jeudi 16 août 2012 18h37
Objet : [Slony1-general] pg_dump backups without slony triggers?
Hi All,
I have a Slony slave that I wish to perform some pg_dumps as backups
from to restore elsewhere for testing. But I don't want the slony schema
or triggers to come in the dump.
my dump right now is like follows:
pg_dump dbname --schema=myschema1 --schema=myschema2
Since I'm specifying specifically two schemas, the slony schema is not
included. However, the slony triggers on the tables within the schemas I
do want to copy are part of the dump. So when I run a restore, it
attempts to create those triggers. The triggers do fail because the
slony schema and elements don't exist, but I don't like the idea of
having a ton of failures in my restoration when restoring this database.
Is there any way in the dump to also exclude slony objects that exist
out of the slony schema?
Thanks,
- Brian F
_______________________________________________
Slony1-general mailing list
[email protected]
http://lists.slony.info/mailman/listinfo/slony1-general
_______________________________________________
Slony1-general mailing list
[email protected]
http://lists.slony.info/mailman/listinfo/slony1-general