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

how to best create a new slave server?



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":

slapcat > db.ldif on a master

and then it failed on a new slave:

# ldapadd -x -D "cn=Manager,dc=some,dc=company" -W -f db.ldif
Enter LDAP Password:
adding new entry "dc=some,dc=company"
ldap_add: Referral (10)
        referrals:
                ldap://192.168.1.10:389/dc=some,dc=company


so I reconfigured a new slave to be a standalone server for a while:


# ldapadd -x -D "cn=Manager,dc=some,dc=company" -W -f db.ldif
Enter LDAP Password:
adding new entry "dc=some,dc=company"
ldap_add: Constraint violation (19)
additional info: structuralObjectClass: no user modification allowed



and it also failed.


What is the best approach to create a new slave server?


-- Tomek http://wpkg.org WPKG - software deployment and upgrades with Samba