[Bucardo-general] how to dump all base tables and not bucardo triggers

Markova, Nina Nina.Markova at NRCan-RNCan.gc.ca
Tue Aug 27 21:35:29 UTC 2013

Thanks Greg and Michelle!

I'll try it.


-----Original Message-----
From: Greg Sabino Mullane [mailto:greg at endpoint.com] 
Sent: August-27-13 17:31
To: Markova, Nina
Cc: bucardo-general at bucardo.org
Subject: Re: [Bucardo-general] how to dump all base tables and not bucardo triggers

> How can I get in one file schema (create, alter) and data statements (copy)  but not bucardo triggers?

It's not easy, as you note. I think Michelle's restore-and-drop-the-bucardo-schema scheme is the best general answer, but you can also filter out all the bucardo stuff like so:

pg_dump --exclude-schema=bucardo -Fc > dump.sql pg_restore -l dump.sql | grep -v bucardo > dump.list pg_restore -L dump.list > newdump.sql

This should work because all of the bucardo objects have bucardo in their name. 
And it will fail if you have any non-bucardo objects with "bucardo" in their name. So don't do that. :)

Greg Sabino Mullane greg at endpoint.com
End Point Corporation
PGP Key: 0x14964AC8

More information about the Bucardo-general mailing list