Symas employee?Sign in

← Knowledge Base

Reference

Convert Single-Master to Multi-Master Replication

Date: 17-01-2022

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 
Or
sudo service solserver stop
Or
sudo systemctl stop solserver.service 
  1. Export the current database and modify the ContextCSNs in the resulting ldif with the new server ID:
slapcat -b  | sed -E -e 
's/#[[:digit:]]{3}#000000$/#001#000000/g' > export.ldif 
  1. Update the serverIDs on all producer's slapd.conf/slapd.d. They must be unique and follow the syntax:
serverID        ###        ldap:///
  1. Delete the .mdb files from /var/symas/openldap-data/ on all servers.
  2. Import the ldif on the first producer:
slapadd -b  -w -l export.ldif 
  1. Export the updated database to an ldif to be imported on all other servers:
slapcat -b  -l export_final.ldif 
  1. Import the export_final ldif on other servers:
slapadd -b  -l export_final.ldif 
  1. Start Solserver/Slapd:
sudo /opt/symas/etc/solserver start 
Or
sudo service solserver start
Or
sudo systemctl start solserver.service 
  1. For Delta-Syncrepl Only, perform a modification to the database on the primary producer. This will trigger replication on all servers.