Promoting Replica to LDAP Master 5.0.x

Promoting Replica to LDAP Master 5.0

   KB 5785        Last updated on 07/11/2015  




0.00
(0 votes)

This document only applies to ZCS 5.0.x and previous. Please use Promoting_Replica_to_LDAP_Master for 6.0.x and later.

Only one master LDAP server can exist and this LDAP server is authoritative for user information, server configuration, etc. The instructions that follow explain how to promote a replica LDAP server to master and disable the previous LDAP master.

Promoting a Replica Server – Demoting the Master Server

Before you can promote a replica LDAP server to become the master LDAP server, your LDAP replication servers must be up and working correctly; that is the replica LDAP server(s) must be receiving LDAP updates from the master. See the Multi-Server Installation Guide, LDAP Replication Installation chapter.

To promote a replica server to be master

1. Shut down all services on ZCS, zmcontrol stop.

2. On the replica LDAP server that will be the new master LDAP server:

a. Make a backup copy of the /opt/zimbra/conf/slapd.conf.in file in case you have to revert this server back to replica.
b. Edit the /opt/zimbra/conf/slapd.conf.in file and delete the replication instructions from the file. The screen that follows is an example of the text you should be looking for.

syncrepl rid=075
provider=ldap://example.com:389
retry="60 +"
type=refreshAndPersist
schemachecking=off
updatedn="uid=zimbrareplication,cn=admins,cn=zimbra"
searchbase=""
bindmethod=simple
binddn="uid=zimbra,cn=admins,cn=zimbra"
credentials=test123
updateref ldap://example.com:389

c. Edit the server’s local config file

zmlocalconfig –e ldap_master_url= <new_master_directory_address>
zmlocalconfig –e ldap_url= <new_master_directory_address>
zmlocalconfig –e ldap_is_master= true

d. Change the LDAP host

zmlocalconfig –e ldap_host= <newmaster_directory_host>

3. Now you run zmmtainit to edit the ldap*.cf files in /opt/zimbra/conf to set the new master LDAP server as the authority for the MTA.These files tell Postfix how to connect to the LDAP server for various commands. If you are moving the directories, you might have Postfix pointing to a server that no longer runs LDAP, which will cause mail delivery to stop.

Note: zmmtainit should be run on the hosts that are running an MTA, but is not required on the other hosts. This is bug 16002, which is fixed for 4.5.7

As zimbra, type the following. The "XX" is a dummy value. The zmmtainit command will use the ldap_url value from localconfig in spite of this. (This is bug 17463, which is also fixed for 4.5.7).

/opt/zimbra/libexec/zmmtainit XX

4. Start the new LDAP master, type zmcontrol start. Then start up the services on all the other servers. At this point, services should be up and running on all hosts, and they should all be working off the new Master LDAP server.

Note: After the replica is promoted to Master, you should verify that the backup schedule is correctly set. Run zmschedulebackup -q. The schedule should match the backup schedule on the Mail Stores. If the backup schedule does not, run the zmschedulebackup command to set the backup schedule correctly.

Converting the master to be a replica

The old LDAP master can be disabled or it can be converted into a replica. To convert the old master to be a replica

  • Remove the contents of its openLDAP databases

cd /opt/zimbra/openldap-data
/opt/zimbra/sleepycat/bin/db_recover
rm alock *.bdb logs/*
cd /opt/zimbra/openldap-data/accesslog/db
/opt/zimbra/sleepycat/bin/db_recover
rm -rf /opt/zimbra/openldap-data/accesslog

  • Change that server’s local config file to designate it as a replica. Type

zmlocalconfig –e ldap_master_url= <master_directory_address>
zmlocalconfig –e ldap_url= <master_directory_address>

zmlocalconfig –e ldap_is_master= false


  • Run zmldapenablereplica to set up the replication account in the directory and make a copy of the master content to the replica LDAP server.


Related Articles

LDAP


Verified Against: Zimbra Collaboration Suite 4.5.6 Date Created: 4/5/2007
Article ID: https://wiki.zimbra.com/index.php?title=Promoting_Replica_to_LDAP_Master_5.0.x Date Modified: 07/11/2015



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search