--On Tuesday, October 18, 2005 12:22 PM +0200 Tomasz Chmielewski <[EMAIL PROTECTED]> wrote:
What is the best and fastest way to create a slave OpenLDAP server? I mean, what should one do if he/she has a master OpenLDAP and several slaves, and want to create another slave? So far I was doing it more or less like this: 1) stopping OpenLDAP on the master, 2) tarring/bzipping /var/lib/ldap to ldap.tar.bz2, 3) adding a new replica to the slapd.conf on the master 4) scp-copying ldap.tar.bz2 to a new slave 5) uncompressing ldap.tar.bz2 to /var/lib/ldap on a new slave 6) starting OpenLDAP on the master 7) starting OpenLDAP on a new slave Which works perfectly, but I feel it's not just a "right way" (it would perhaps fail if OpenLDAP/database versions differ too much). So I tried a "better way":
Personally, I'd stop a replica with identical indexing to the new one, and then copy over all the *.bdb files and the BDB log files, then restart both the replicas (assuming syncrepl for replication). This (on a large DB with plenty of indexing) is faster for me than slapcat/slapadd. There is nothing "wrong" with this approach.
--Quanah -- Quanah Gibson-Mount Principal Software Developer ITSS/Shared Services Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html
