[Bucardo-general] Replication sync/resync/fix script (for large DBs you don't want to re-intialise)
michelle at sorbs.net
Fri Feb 1 17:01:02 UTC 2013
Something I came up with you might find useful..
The script is designed to work in conjunction with Bucardo and can be
used to intialise or resync a table/tables/whole DB by updating every
row on the master not on the slave. This is useful when you suspect
dataloss or corruption on a slave (or intermediary hub/slave) or if you
add a table to the master and don't want to lock Master during the
intialisation by using 'full copy' ...
In my case, I had a RAID failure and was forced to rebuild the slave
with zero_bad_pages set... the script was run afterwards and it
identified 45m (million) rows out of sync one just one of the 50 odd
tables and it subsequently forced Bucardo to re-copy those rows from the
master via the replication hub to the corrupt slave.
Enjoy... feel free to report issues, the config should be self
explanatory with the comments I put in. Feedback appreciated.
More information about the Bucardo-general