5.4 - Replication

5.4.1 Replication overview

ApacheDS supports both Producer-Consumer and Multi-Producers replication based on the syncrepl specification.

Initial steps

The below initial conditions must be met before configuring the replication in any mode.

  • Make sure all the servers are up and running

  • Add the configuration of the partition whose data needs to be replicated. For example if we like to replicate the partition dc=apache,dc=org then make sure to configure this partition in all the servers that are configured to replicate. See Adding Partition

Configuring Producer-Consumer replication

Assuming that the Producer is running on localhost at port 10389 and consumer on localhost at port 11997 and we want to replicate the data from partition dc=apache,dc=org

The below configuration must be added in the Consumer server and it should be restarted.

dn: ads-replConsumerId=consumer1,ou=replConsumers,ads-serverId=ldapServer,ou=servers,ads-directoryServiceId=default,ou=config
ads-replconsumerid: consumer1
ads-replstrictcertvalidation: FALSE
ads-replusetls: FALSE
ads-replsearchtimeout: 0
ads-replsearchfilter: (objectClass=*)
ads-replsearchsizelimit: 0
ads-replattributes: *
ads-replrefreshinterval: 60000
ads-repluserpassword: secret
ads-repluserdn: uid=admin,ou=system
ads-replprovport: 10389
ads-replprovhostname: localhost
ads-replrefreshnpersist: TRUE
ads-replsearchscope: sub
ads-searchbasedn: dc=apache,dc=org
ads-enabled: TRUE
objectclass: ads-replConsumer
objectclass: ads-base
objectclass: top
ads-replaliasderefmode: never