[Date Prev][Date Next]
Re: Syncrepl out-of-sync detection.
On 8/22/06, Bernd Schubert <email@example.com> wrote:
Another question, I just tested to simply dump everything with ldapsearch then
to compare the results with diff. Tthe entries are in principle identical,
only some newer entries are at different positions within the resulting ldif
files. Is this common? Of course, that way my rude approach to compare the
databases will fail. The next attempt would be to compare entry by entry, but
maybe your script already does this?
Yes, that's common. I would "split" the file in "entries", sort the
file by "dn" (keeping each object as a whole), and "internally" sort
each object (so that all attributes on each object are in the same
order). Off course: make sure to keep dn as the first field. After
sorting the files, you can use diff on them safely.
I was about to take that approach. The problem is that it would mean
transfering the "whole" ldif from the slave to the master from
time-to-time. Not too bad, if you only do it, say, once every 48
hours. Other approach wold be to use rsync; or to send the DNs with
an SHA1 hash of the rest of the entry, and compare. If something
differs, just issue a warning about it, and then transfer the whole
entry (in order to fill a complete report of the sync status). But as
you can see, it can be a rather complex system.
I'll give a look at "hobbit" (thanks Buchan), and report about it.
Thanks for all your answers,