LDAP Replication

How to replicate an LDAP database to a second server.

Resources
OpenLDAP Administration Guide's section on LDAP SyncReplication.

"Provider" ("master") configuration
On the provider (master) server, edit /usr/local/etc/openldap/slapd.conf and change the index line from something similar to:

index objectClass eq

to:

index objectClass,entryCSN,entryUUID eq

Then add 3 lines:

overlay syncprov
syncprov-checkpoint 100 10
syncprov-sessionlog 100

Restart slapd:

svc -t /service/slapd

"Consumer" ("slave") configuration
Once the replica server, edit /usr/local/etc/openldap/slapd.conf and add/edit the index line to:

index objectclass,entryCSN,entryUUID eq

Then add the syncrepl details:

syncrepl rid=123
provider=ldap://provider.example.com:389
type=refreshOnly
interval=01:00:00:00
searchbase="dc=example,dc=com"
filter="(objectClass=organizationalPerson)"
scope=sub
attrs="cn,sn,ou,telephoneNumber,title,l"
schemachecking=off
bindmethod=simple
binddn="cn=syncuser,dc=example,dc=com"
credentials=secret

Recent Updates

  • 2 years 3 days ago
  • 2 years 3 days ago
  • 2 years 5 days ago
    php 8.x
  • 2 years 6 days ago
    10.6.7
  • 2 years 1 week ago
    Drop Centos 5/6 stuff