LDAP Replicas 4.5.x to 5.0.x

Admin Article

Article Information

This article applies to the following ZCS versions.

ZCS 5.0 Article ZCS 5.0 ZCS 4.5 Article ZCS 4.5

This article contains updated information for those running LDAP Replicas.

Note: We strongly suggest that if you ever did an upgrade from 4.5.10 (or prior) -> 5.0.1 (or prior) at any time and have LDAP replicas, please go & refresh the replicas.

Note: Updating to 5.0.2 will not fix the data issues in the replicas. The only solution is to reload the replicas if you went from 4.5.10 (or prior) -> 5.0.1 (or prior).


Still in the 4.5.x series?

  • If you make use of LDAP replicas & are still on 4.5.10 (or prior), you don't need to update to 4.5.11 before switching to 5.0.2
  • If you have LDAP replicas when going 4.5.11 > 5.0.2 you should still follow the directions given at LDAP Replicas 4.5.x to 5.0.x - Zimbra :: Wiki on updating the replica schemas before upgrading the master LDAP. You should also follow the instructions to replace the zmupgrade.pm script file on the LDAP replicas in order to avoid the mime tree getting deleted. When it is released, 5.0.3 will have the updated zmupgrade.pm file included.


ZCS 4.5.x -> 5.0.x upgrade workaround

If upgrading to any ZCS 5.0.x please use the workaround below.

This procedure allows all the replica servers to properly preserve the changes made to the master during the upgrade process and allows ZCS 5.0.x non-LDAP servers to work with the 4.5.x replica servers.

Choosing to remove your LDAP replicas during the upgrade and install fresh ones is also an alternative if you wish.

Schema workaround for ANY 4.5.x > 5.0.x migration:

If you have LDAP replica servers configured for ZCS, when you upgrade from 4.5.x to 5.0, you must modify each LDAP replica server before you upgrade the LDAP master server.

1. On each LDAP replica server perform the following:

Stop LDAP, as the zimbra user, type ldap stop
Change directory, type cd /opt/zimbra/openldap/etc/openldap/schema/
As the root user, type mv zimbra.schema zimbra.schema.old
As the root user, type wget http://files.zimbra.com/downloads/5.0.2_GA/zimbra.schema
As the root user, type chown zimbra:zimbra zimbra.schema
As the root user, type chmod 664 zimbra.schema
Restart the server, as the zimbra user, type ldap start

wget isn't available on macs. Use curl -O instead

2. Upgrade the LDAP master as described in the release notes

3. Upgrade the LDAP replicas:

Stop LDAP, as the zimbra user, type ldap stop
As the root user, from the directory where you have the 5.0.x binaries, run "install.sh -s" to install the software
Change directory, cd /opt/zimbra/libexec
As the root user, type mv zmupgrade.pm zmupgrade.pm.old
As the root user, type wget http://files.zimbra.com/downloads/5.0.2_GA/zmupgrade.pm.gz
As the root user, type gunzip zmupgrade.pm.gz
As the root user, run zmsetup.pl

wget isn't available on macs. Use curl -O instead

Note: When 5.0.3 is released, you don't need to replace the zmupgrade.pm script, you can just run "install.sh" directly.

Troubleshooting LDAP Replica 4.5 -> 5.0 Upgrades

Parts of ZCS not functioning correctly

Should you forget to follow the above instructions when upgrading from 4.5.11 -> 5.0.2, don't despair! No harm to your LDAP data will occur. However some parts of ZCS will not function correctly until all of the replicas are also upgraded to 5.0.2. Additionally, you'll need to manually add the mime tree.

Important: ZCS will not begin to function correctly until you have manually added the mime tree.

Below is an explanation of the issue:

From 4.5.11, you will still run into the zimbraAdminURL bug when you take your master to 5.0.2, until all replicas are also on 5.0.2. You can avoid this by doing the same upgrade procedure we had for going from 4.5.10 (or prior) > 5.0.1 (or prior), where you update zimbra.schema on the replicas prior to upgrading the master.

The big difference between 4.5.10 and 4.5.11 on a v5 upgrade, is that if you choose not to upgrade zimbra.schema prior to upgrading the master, your replica DB will remain consistent with 4.5.11, whereas with 4.5.10 certain changes would not be propagated and the replica databases would be inconsistent from then on.

Replicas out-of-sync

If you have already upgraded from 4.5 to 5.0.1, and the replicas have become out of sync, use the following fix:

1. On the Master:

 su - zimbra
If you upgrade to 5.0.2 (or prior) and your mime tree is lost, also run:
  ldapmodify -D uid=zimbra,cn=admins,cn=zimbra -w `zmlocalconfig -m nokey -s zimbra_ldap_password` \
  -h `zmhostname` -x -a -f /opt/zimbra/lib/conf/zimbra_mimehandlers.ldif
 /opt/zimbra/openldap/sbin/slapcat -b '' -f /opt/zimbra/conf/slapd.conf -l /tmp/ldap.ldif
 scp /tmp/ldap.ldif root@replica:/tmp/ldif

2. On the Replica:

 chown zimbra:zimbra /tmp/ldap.ldif
 su - zimbra
 ldap stop
 exit
 mv /opt/zimbra/openldap-data /opt/zimbra/openldap-data-old
 mkdir -p /opt/zimbra/openldap-data/logs
 cp /opt/zimbra/openldap-data-old/DB_CONFIG /opt/zimbra/openldap-data
 chown -R zimbra:zimbra /opt/zimbra/openldap-data/
 su - zimbra
 /opt/zimbra/openldap/sbin/slapadd -w -q -b '' -f /opt/zimbra/conf/slapd.conf -l /tmp/ldap.ldif
 ldap start

Note: If you run into indexing issues because your mime tree is lost, it is recommended that you re-index all your mailboxes after reloading the mime tree.


Verified Against: unknown Date Created: 1/28/2008
Article ID: https://wiki.zimbra.com/index.php?title=LDAP_Replicas_4.5.x_to_5.0.x Date Modified: 2015-03-24



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