[Bucardo-general] Master-Master->slave working?
Michelle Sullivan
michelle at sorbs.net
Mon Jun 21 17:12:32 UTC 2010
Hi All,
I have setup a master-master and master-slave replication set with 3
servers.
aumaster <-> usmaster as a swap sync.
usmaster -> backup_server as a delta sync.
I started by exporting the 'live' data from aumaster and importing it
into usmaster and backup_server.
I then re-installed bucardo and set it up as follows:
./bucardo_ctl --dbuser pgsql --dbname bucardo --dbhost stinger.sorbs.net
--dbport 5432 --piddir /var/run install --verbose --debug
./bucardo_ctl set default_email_host=anaconda.sorbs.net
./bucardo_ctl set default_email_to=michelle at sorbs.net
./bucardo_ctl set default_email_from=bucardo at sorbs.net
./bucardo_ctl add database sorbs host=zyklon.sorbs.net user=xx(su)xx
pass=xxxx name=aumaster
./bucardo_ctl add database sorbs host=ricochet.sorbs.net user=xx(su)xx
pass=xxxx name=usmaster
./bucardo_ctl add database sorbs host=stinger.sorbs.net user=xx(su)xx
pass=xxxx name=backup_server
./bucardo_ctl add table public.account2email db=aumaster ping=true
standard_conflict=source herd=sorbs2master
./bucardo_ctl add table public.hosts db=aumaster ping=true
standard_conflict=source herd=sorbs2master
./bucardo_ctl add table public.evidence db=aumaster ping=true
standard_conflict=source herd=sorbs2master
./bucardo_ctl add table public.authorisation db=aumaster ping=true
standard_conflict=source herd=sorbs2master
.
.
.
.
./bucardo_ctl add table public.statistics db=aumaster ping=true
standard_conflict=source herd=sorbs2master
./bucardo_ctl add table public.changes db=aumaster ping=true
standard_conflict=source herd=sorbs2master
./bucardo_ctl add table public.hostchanges db=aumaster ping=true
standard_conflict=source herd=sorbs2master
./bucardo_ctl add sequence public.export_primary_key_seq db=aumaster
ping=true standard_conflict=source herd=sorbs2master
./bucardo_ctl add sequence public.users_id_seq db=aumaster ping=true
standard_conflict=source herd=sorbs2master
./bucardo_ctl add sequence public.useraccounts_sid_seq db=aumaster
ping=true standard_conflict=source herd=sorbs2master
.
.
.
./bucardo_ctl add sequence public.notifications_pk_seq db=aumaster
ping=true standard_conflict=source herd=sorbs2master
./bucardo_ctl add sequence public.roles_id_seq db=aumaster ping=true
standard_conflict=source herd=sorbs2master
./bucardo_ctl add sequence public.host_export_primary_key_seq
db=aumaster ping=true standard_conflict=source herd=sorbs2master
./bucardo_ctl add table public.account2email db=usmaster ping=true
standard_conflict=source herd=sorbs2slave
./bucardo_ctl add table public.hosts db=usmaster ping=true
standard_conflict=source herd=sorbs2slave
./bucardo_ctl add table public.evidence db=usmaster ping=true
standard_conflict=source herd=sorbs2slave
./bucardo_ctl add table public.authorisation db=usmaster ping=true
standard_conflict=source herd=sorbs2slave
.
.
.
.
./bucardo_ctl add sequence public.captcha_id_seq db=usmaster ping=true
standard_conflict=source herd=sorbs2slave
./bucardo_ctl add sequence public.notifications_pk_seq db=usmaster
ping=true standard_conflict=source herd=sorbs2slave
./bucardo_ctl add sequence public.roles_id_seq db=usmaster ping=true
standard_conflict=source herd=sorbs2slave
./bucardo_ctl add sequence public.host_export_primary_key_seq
db=usmaster ping=true standard_conflict=source herd=sorbs2slave
./bucardo_ctl add sync sorbs2_swap source=sorbs2master targetdb=usmaster
--verbose type=swap status=active
./bucardo_ctl status sorbs2_swap
./bucardo_ctl add sync sorbs2_delta source=sorbs2slave
targetdb=backup_server --verbose type=pushdelta status=active
./bucardo_ctl status sorbs2_delta
./bucardo_ctl start
./bucardo_ctl status
tail -100f log.bucardo
Every thing seems to go well - no errors, then I connected to aumaster
and implemented a change, which resulted in the following:
[Mon Jun 21 11:28:46 2010] MCP Listening on source server "aumaster"
for "bucardo_kick_sync_sorbs2_swap"
[Mon Jun 21 11:28:47 2010] MCP Listening on remote server usmaster for
"bucardo_kick_sync_sorbs2_swap"
[Mon Jun 21 11:28:47 2010] MCP Active syncs: 2
[Mon Jun 21 11:28:47 2010] MCP Entering main loop
[Mon Jun 21 11:28:47 2010] MCP Checking for existing controllers for
sync "sorbs2_delta"
[Mon Jun 21 11:28:47 2010] MCP Created controller 71989 for sync
"sorbs2_delta". Kick is 1
[Mon Jun 21 11:28:47 2010] MCP Checking for existing controllers for
sync "sorbs2_swap"
[Mon Jun 21 11:28:47 2010] MCP Created controller 71990 for sync
"sorbs2_swap". Kick is 1
[Mon Jun 21 11:28:48 2010] CTL Controller starting for sync
"sorbs2_delta". Source herd is "sorbs2slave". PID:71989
[Mon Jun 21 11:28:48 2010] CTL database: backup_server synctype:
pushdelta stayalive: 1 checksecs: 0
[Mon Jun 21 11:28:48 2010] CTL limitdbs: 0 kicked: 1 kidsalive: 1
onetimecopy: 0
[Mon Jun 21 11:28:48 2010] CTL lifetimesecs: 0 (<NULL>) maxkicks: 0
[Mon Jun 21 11:28:48 2010] CTL Controller starting for sync
"sorbs2_swap". Source herd is "sorbs2master". PID:71990
[Mon Jun 21 11:28:48 2010] CTL database: usmaster synctype: swap
stayalive: 1 checksecs: 0
[Mon Jun 21 11:28:48 2010] CTL limitdbs: 0 kicked: 1 kidsalive: 1
onetimecopy: 0
[Mon Jun 21 11:28:48 2010] CTL lifetimesecs: 0 (<NULL>) maxkicks: 0
[Mon Jun 21 11:28:48 2010] CTL Herd member 9830287: public.hosts
[Mon Jun 21 11:28:48 2010] CTL Target oids: usmaster:1776991
.
.
.
.
[Mon Jun 21 11:28:48 2010] CTL Herd member 1777068:
public.notifications_pk_seq
[Mon Jun 21 11:28:48 2010] CTL Herd member 1777091: public.roles_id_seq
[Mon Jun 21 11:28:48 2010] CTL Created new kid 71993 for sync
"sorbs2_swap" to database "usmaster"
[Mon Jun 21 11:28:48 2010] CTL Herd member 1777004:
public.host_export_primary_key_seq
[Mon Jun 21 11:28:48 2010] CTL Created new kid 71994 for sync
"sorbs2_delta" to database "backup_server"
[Mon Jun 21 11:28:48 2010] KID New kid, syncs "aumaster" to "usmaster"
for sync "sorbs2_swap" alive=1 Parent=71990 Type=swap PID=71993
[Mon Jun 21 11:28:48 2010] KID New kid, syncs "usmaster" to
"backup_server" for sync "sorbs2_delta" alive=1 Parent=71989
Type=pushdelta PID=71994
[Mon Jun 21 11:46:43 2010] KID Source delta count for public.evidence: 1
[Mon Jun 21 11:46:44 2010] KID Source delta count for public.evid2raw: 1
[Mon Jun 21 11:46:45 2010] KID Source delta count for public.audit: 1
[Mon Jun 21 11:46:46 2010] KID Source delta count for public.nets2evid: 1
[Mon Jun 21 11:46:47 2010] KID Source delta count for public.networks: 1
[Mon Jun 21 11:46:48 2010] KID Source delta count for public.rawevidence: 1
[Mon Jun 21 11:46:52 2010] KID Source delta count for public.changes: 1
[Mon Jun 21 11:47:41 2010] KID Finished syncing. Time: 59. Updates: 0+0
Inserts: 0+7 Deletes: 0+0 Sync: sorbs2_swap. Keepalive: 1
Then nothing....
./bucardo_ctl status
Days back: 3 User: bucardo Database: bucardo PID of Bucardo MCP: 71975
Name Type State PID Last_good Time I/U/D Last_bad Time
============+=====+=====+=====+=========+=====+=====+========+====
sorbs2_delta| P |idle |71989|39m58s |0s |0/0/0|unknown |
sorbs2_swap | S |idle |71990|21m5s |59s |7/0/0|unknown |
./bucardo_ctl status sorbs2_delta
Days back: 3 User: bucardo Database: bucardo
======================================================================
Sync name: sorbs2_delta
Current state: idle (PID = 71989)
Type: pushdelta
Source herd/database: sorbs2slave / usmaster
Target database: backup_server
Tables in sync: 58
Last good: 41m 0s (time to run: 0s)
Last good time: Jun 21, 2010 11:28:48 Target: backup_server
Ins/Upd/Del: 0 / 0 / 0
Last bad: unknown
PID file: /var/run/bucardo.ctl.sync.sorbs2_delta.pid
PID file created: Mon Jun 21 11:28:48 2010
Status: active
Limitdbs: 0
Priority: 0
Checktime: none
Overdue time: 00:00:00
Expired time: 00:00:00
Stayalive: yes Kidsalive: yes
Rebuild index: 0 Do_listen: no
Ping: yes Makedelta: inherits/inherits
Onetimecopy: 0
./bucardo_ctl status sorbs2_swap
Days back: 3 User: bucardo Database: bucardo
======================================================================
Sync name: sorbs2_swap
Current state: idle (PID = 71990)
Type: swap
Source herd/database: sorbs2master / aumaster
Target database: usmaster
Tables in sync: 58
Last good: 22m 53s (time to run: 59s)
Last good time: Jun 21, 2010 11:47:41 Target: usmaster
Ins/Upd/Del: 7 / 0 / 0
Last bad: unknown
PID file: /var/run/bucardo.ctl.sync.sorbs2_swap.pid
PID file created: Mon Jun 21 11:28:48 2010
Status: active
Limitdbs: 0
Priority: 0
Checktime: none
Overdue time: 00:00:00
Expired time: 00:00:00
Stayalive: yes Kidsalive: yes
Rebuild index: 0 Do_listen: no
Ping: yes Makedelta: inherits/inherits
Onetimecopy: 0
./bucardo_ctl list herds
Herd: sorbs2master DB: aumaster Members: public.hosts,
public.evidence, public.authorisation, public.captcha, public.comments,
public.dns, public.evid2raw, public.emails, public.actions,
public.hosts2evid, public.matviews, public.audit, public.nets2evid,
public.most_recent_nets_cached, public.nets2nets, public.permission,
public.rdnsqueue, public.netowners, public.networks, public.users,
public.nets2hosts, public.notifications, public.rawevidence,
public.reportq, public.sessions, public.useraccounts, public.whois2name,
public.usernets, public.userprefs, public.whois, public.whoisnames,
public.most_recent_hosts_cached, public.whoisobjects,
public.wnetassignments, public.netnames, public.roles,
public.netassignments, public.evid2comm, public.evid2rt,
public.statistics, public.changes, public.hostchanges,
public.export_primary_key_seq, public.users_id_seq,
public.useraccounts_sid_seq, public.evidence_evidid_seq,
public.rawevidence_rawid_seq, public.netnames_nameid_seq,
public.userpermissions_id_seq, public.usernets_id_seq,
public.hosts_hostsid_seq, public.networks_netid_seq,
public.audit_pk_seq, public.captcha_id_seq, public.notifications_pk_seq,
public.roles_id_seq, public.host_export_primary_key_seq,
public.account2email
Used in syncs: sorbs2_swap
Herd: sorbs2slave DB: usmaster Members: public.account2email,
public.hosts, public.evidence, public.authorisation, public.captcha,
public.comments, public.dns, public.evid2raw, public.emails,
public.actions, public.hosts2evid, public.matviews, public.audit,
public.nets2evid, public.most_recent_nets_cached, public.nets2nets,
public.permission, public.rdnsqueue, public.netowners, public.networks,
public.users, public.nets2hosts, public.notifications,
public.rawevidence, public.reportq, public.sessions,
public.useraccounts, public.whois2name, public.usernets,
public.userprefs, public.whois, public.whoisnames,
public.most_recent_hosts_cached, public.whoisobjects,
public.wnetassignments, public.netnames, public.roles,
public.netassignments, public.evid2comm, public.evid2rt,
public.statistics, public.changes, public.hostchanges,
public.export_primary_key_seq, public.users_id_seq,
public.useraccounts_sid_seq, public.evidence_evidid_seq,
public.rawevidence_rawid_seq, public.netnames_nameid_seq,
public.userpermissions_id_seq, public.usernets_id_seq,
public.hosts_hostsid_seq, public.networks_netid_seq,
public.audit_pk_seq, public.captcha_id_seq, public.notifications_pk_seq,
public.roles_id_seq, public.host_export_primary_key_seq
Used in syncs: sorbs2_delta
Checking the DBs the aumaster <-> usmaster replication worked no
problem, but it appears nothing happened with usmaster -> backup_server
This is unexpected for me, and any insight to what went wrong would be
gratefully received.
Thanks in advance,
Michelle
More information about the Bucardo-general
mailing list