[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Re-initializing master when syncrepl is used

On 6/20/06, Aleksandar Milivojevic <alex@milivojevic.org> wrote:
If I wipe out all database files from /var/lib/ldap directory on one
LDAP server (master) that had data replicated (using syncrepl) to
several slaves, then use ldapadd to add all the entries back,

You don't want to use ldapadd to put the entries back. You should use slapcat on a slave to extract a data set, and use 'slapadd -w' (you may want other options, eg -q as well) to add the entries back.

Of course, consult the man page for slapadd.

do I
need to also wipe out database files on the slaves and have syncrepl
pull all the data from the master again for everything to work

No, as long as the attributes sync-repl uses are maintained, everything should work afterwards. But, note that these attributes are operational, you won't see them in a normal ldapsearch (unless you request them), and you may not be able to write to them via ldapadd.

 All the slaves are read-only (access rules do not allow
any updates, except for syncrepl).

No slave will accept updates if it is correctly configured as a slave, unless you are doing really bad things (like using replica accounts for other purposes) to a slave configured for push replication.