[Bucardo-general] how to dump all base tables and not bucardo triggers
Michelle Sullivan
michelle at sorbs.net
Tue Aug 27 20:22:26 UTC 2013
pg_dump --blobs -N bucardo <database>
Michelle Sullivan
http://www.mhix.org/
Sent from my iPad
On 26 Aug 2013, at 23:46, "Markova, Nina" <Nina.Markova at NRCan-RNCan.gc.ca> wrote:
> Hello,
>
> I have set up multi-master replication (2 machines) with bucardo.
> I would like to dump the base tables from a particular database (public schema excluding bucardo objects) and load them in a fresh database machine in order to start a clean and different bucardo setup there.
>
> I tried pg_dump with different options - I used –s (and –schema-only) switches and I still get the triggers on the replicated tables.
> It looks like the triggers bucardo_kick_* etc. are part of the public schema.
>
> How can I get in one file schema (create, alter) and data statements (copy) but not bucardo triggers?
> Of course, I can edit the file and remove the lines for triggers …
>
> pg_dump -U postgres -s -n public -f sta_pgs2-schema.pgdump sta
> pg_dump -S postgres --disable-triggers -n public -f sta_pgs2-disabletrig-public-S.pgdump sta
>
> Here it is part of the output with triggers statements:
>
> --
> -- Name: bucardo_kick_sta_sync; Type: TRIGGER; Schema: public; Owner: postgres
> --
>
> CREATE TRIGGER bucardo_kick_sta_sync AFTER INSERT OR DELETE OR UPDATE OR TRUNCATE ON site FOR EACH STATEMENT EXECUTE PROCEDURE bucardo.bucardo_kick_sta_sync();
>
>
> --
> -- Name: bucardo_note_trunc_sta_sync; Type: TRIGGER; Schema: public; Owner: postgres
> --
>
> CREATE TRIGGER bucardo_note_trunc_sta_sync AFTER TRUNCATE ON a0factor FOR EACH STATEMENT EXECUTE PROCEDURE bucardo.bucardo_note_
> truncation('sta_sync');
>
> thanks,
>
> Nina
>
> _______________________________________________
> Bucardo-general mailing list
> Bucardo-general at bucardo.org
> https://mail.endcrypt.com/mailman/listinfo/bucardo-general
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20130827/a1f08360/attachment.html>
More information about the Bucardo-general
mailing list