[Bucardo-general] Replication problems? data overwritten?

Michelle Sullivan michelle at sorbs.net
Mon Aug 26 15:32:41 UTC 2013


eric machine wrote:
> Hi Michelle,
>
> That's clearer :) Thanks.
>
> But yes I am looking at 3 masters and 1 slave.
>
> However I run this command below:-
>
> bucardo add dbgroup tgroup dbbranch1:source dbbranch2:source
> dbbranch3:source dbhq:target
>
> It should be working right? I mean all the 3 masters into dbhq only?
>
> But it's not working as I expected. How come master dbbranch2 will
> write to another master dbbranch1? or did I configure it wrongly?
>
> Basically I need this:-
>
> dbbranch1 -> will always replicate only to -> dbhq
> dbbranch2 -> will always replicate only to -> dbhq
> dbbranch3 -> will always replicate only to -> dbhq
>
> Any help? Thanks.

To do that you need 3 syncs I think:

bucardo install
bucardo add database dbbranch1 host=192.168.56.12 dbname=branch1
bucardo add database dbbranch2 host=192.168.56.13 dbname=branch2
bucardo add database dbbranch3 host=192.168.56.14 dbname=branch3
bucardo add database dbhq host=192.168.56.11 dbname=dbhq
bucardo add all tables db=dbhq -T nopktable herd=therd
bucardo add dbgroup tgroup1 dbbranch1:source dbhq:target
bucardo add dbgroup tgroup2 dbbranch2:source dbhq:target
bucardo add dbgroup tgroup3 dbbranch3:source dbhq:target
bucardo add sync foobar1 herd=therd dbs=tgroup1 ping=false autokick=0
checktime=300
bucardo add sync foobar2 herd=therd dbs=tgroup2 ping=false autokick=0
checktime=300
bucardo add sync foobar3 herd=therd dbs=tgroup3 ping=false autokick=0
checktime=300
bucardo validate foobar1
bucardo validate foobar2
bucardo validate foobar3
bucardo start
bucardo kick foobar1
bucardo kick foobar2
bucardo kick foobar3
bucardo status  <--- note this won't stop 'no rows found, infact it
might cause it if the tables haven't had any updates since the last sync.

bucardo update sync foobar1 autokick=1
bucardo update sync foobar2 autokick=1
bucardo update sync foobar3 autokick=1
bucardo reload config

-- 
Michelle Sullivan
http://www.mhix.org/



More information about the Bucardo-general mailing list