The other thing you can do is: pg_dump -f db.sql <database> && echo "DROP SCHEMA bucardo CASCADE;" >> db.sql
Though that kludge will only work if you are restoring to a db without bucardo installed... And it is a kludge, it will include bucardo, then drop everything bucardo at the end of the restore... Michelle Sullivan http://www.mhix.org/ Sent from my iPad On 27 Aug 2013, at 23:03, "Markova, Nina" <[email protected]> wrote: > Thanks. I’ll try it. > > Nina > > From: Michelle Sullivan [mailto:[email protected]] > Sent: August-27-13 16:22 > To: Markova, Nina > Cc: [email protected]; Markova, Nina > Subject: Re: [Bucardo-general] how to dump all base tables and not bucardo > triggers > > 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" <[email protected]> > 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 > [email protected] > https://mail.endcrypt.com/mailman/listinfo/bucardo-general
_______________________________________________ Bucardo-general mailing list [email protected] https://mail.endcrypt.com/mailman/listinfo/bucardo-general
