Replication with slurpd
slurpd provides a server to client replication mechanism. The master
slapd instance uses the LDAP protocol to update its slaves.
Sample replication scenario
- The LDAP client submits an LDAP modify operation to the slave slapd.
- The slave slapd returns a referral to the LDAP client referring the client to the master slapd.
- The LDAP client submits the LDAP modify operation to the master slapd.
- The master slapd performs the modify operation, writes out the change to its replication log file an returns a success code to the client.
- The slurpd process notices that a new entry has been appended to the replication log file, reads the replication log entry, and sends the change to the slave slapd via LDAP.
- The slave slapd performs the modify operation and returns a success code to the slurpd process.
(from the Open LDAP administrator's guide)
Configuring slurpd and a slave slapd instance
Set up the master
slapdAdd a
replicadirective for each replica in theslapd.confconfiguration file. Thebinddnparameter must match theupdatednoption in the slaveslapdconfiguration file. The entry named in thebinddnoption must have write permissions to the slave database.Example:
replica uri=ldap://slave.domain.tld:389 binddn="cn=jeeves,dc=domain,dc=tld" bindmethod=simple credentials=secretAdd a
replogfiledirective, which tellsslapdwhere to log changes.slurpdwill read this file.Copy the master
slapddatabase to the slaveShut down the master server and use
slapcatto output the database in LDIF format. Load the LDIF file to the slave server.Restart the master
slapdand start the slaveslapd