Symas OpenLDAP Knowledge Base

Convert Single-Master to Multi-Master Replication

Note: A serverID of 000 (which is the default) is indicative of a single Producer. Note: The serverID is used to populate the “replica ID” field of all CSNs generated by the specified server.

  1. Stop Solserver/Slapd

     sudo /opt/symas/etc/solserver stop 
     sudo service solserver stop
     sudo systemctl stop solserver.service 
  2. Export the current database and modify the ContextCSNs in the resulting LDIF with the new server ID.

     slapcat -b <your-base-dn> | sed -E -e 
     's/#[[:digit:]]{3}#000000$/#001#000000/g' > export.ldif 
  3. Update the serverIDs on all Producer’s slapd.conf/slapd.d. They must be unique and follow the syntax:

     serverID        ###        ldap://<server's FQDN>/
  4. Delete the .mdb files from /var/symas/openldap-data/ on all servers.

  5. Import the ldif on the First Producer

     slapadd -b <your-base-dn> -w -l export.ldif 
  6. Export the updated database to an ldif to be imported on all other servers

     slapcat -b <your-base-dn> -l export_final.ldif 
  7. Import the export_final ldif on other servers

     slapadd -b <your-base-dn> -l export_final.ldif 
  8. Start Solserver/Slapd

     sudo /opt/symas/etc/solserver start 
     sudo service solserver start
     sudo systemctl start solserver.service 
  9. For Delta-Syncrepl Only, perform a modification to the database on the primary Producer. This will trigger replication on all servers.