<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>You need to use a temporary table of content of your dump excluding these trigger using grep</span></div><div><br><span></span></div><div><span>Example</span></div><div><br><span></span></div><div><span>1) Generate backup.dump with the <br></span></div><div><br><span></span></div><div>pg_dump -Fc -f backup.dump&nbsp; --schema=myschema1 --schema=myschema2 -hlocalhost -p5432 .....</div><div><br></div><div>2) Use flag l to read the table of contents of your backup.dump&nbsp;</div><div><br></div><div>Let&nbsp; suppose that your Slony schema is named 'myslonycluster' then<br></div><div><br></div><div>pg_restore -l backup.dump | grep -v '_myslonycluster' &gt; safe.toc</div><div><br></div><div>3) Now you can restore your two schemas using -L flag <br></div><div><br></div><div>pg_restore -L safe.toc -d your_database
 backup.dump</div><div><br></div><div><br></div><div>David.<br></div><div><br></div>  <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1">  <b><span style="font-weight:bold;">De&nbsp;:</span></b> Brian Fehrle &lt;brianf@consistentstate.com&gt;<br> <b><span style="font-weight: bold;">À&nbsp;:</span></b> "slony1-general@lists.slony.info" &lt;slony1-general@lists.slony.info&gt; <br> <b><span style="font-weight: bold;">Envoyé le :</span></b> Jeudi 16 août 2012 18h37<br> <b><span style="font-weight: bold;">Objet&nbsp;:</span></b> [Slony1-general] pg_dump backups without slony triggers?<br> </font> </div> <br>Hi All,<br><br>I have a Slony slave that I wish to perform some pg_dumps as backups <br>from to restore elsewhere for testing. But I don't want the slony schema <br>or triggers
 to come in the dump.<br><br>my dump right now is like follows:<br><br>pg_dump dbname --schema=myschema1 --schema=myschema2<br><br>Since I'm specifying specifically two schemas, the slony schema is not <br>included. However, the slony triggers on the tables within the schemas I <br>do want to copy are part of the dump. So when I run a restore, it <br>attempts to create those triggers. The triggers do fail because the <br>slony schema and elements don't exist, but I don't like the idea of <br>having a ton of failures in my restoration when restoring this database.<br><br>Is there any way in the dump to also exclude slony objects that exist <br>out of the slony schema?<br><br>Thanks,<br><br>- Brian F<br>_______________________________________________<br>Slony1-general mailing list<br><a ymailto="mailto:Slony1-general@lists.slony.info" href="mailto:Slony1-general@lists.slony.info">Slony1-general@lists.slony.info</a><br><a
 href="http://lists.slony.info/mailman/listinfo/slony1-general" target="_blank">http://lists.slony.info/mailman/listinfo/slony1-general</a><br><br><br> </div> </div>  </div></body></html>