Importing LDAP data from master to replica 6.0

From Zimbra :: Wiki

Jump to: navigation, search
   Icon-Archive.png  - This is archive documentation, which means it is not supported or valid for recent versions of Zimbra Collaboration.

   Article-alert.png  - This article is a Work in Progress, and may be unfinished or missing sections.

Admin Article

Article Information

This article applies to the following ZCS versions.
  ZCS 6.0 Article  ZCS 6.0
  ZCS 7.0 Article  ZCS 7.0

If an ldap replica is not in sync with the master, it is possible to manually load all of the data from the master into the replica.

See [reload replicas for out of sync data] for ZCS 8.

On the ZCS node where the ldap master is running

Export an ldif of the master ldap database.

# su - zimbra
$ ~/libexec/zmslapcat /tmp

On the ZCS node where the ldap replica is running

Copy the file ldap.bak from the master to the replica (this example assumes that the hostname of the master is

# su - zimbra
$ scp /tmp/ldap-master.ldif

Stop the ldap service.

$ ldap stop

Move aside the existing ldap data (for this example, the data directory is renamed with the current date (2007-12-07) and state (out-of-sync) of the data), and create a new empty data directory.

$ cd /opt/zimbra/data/ldap
$ mv hdb hdb.2007-12-07-out-of-sync
$ mkdir -p /opt/zimbra/data/ldap/hdb/db
$ mkdir -p /opt/zimbra/data/ldap/hdb/logs

Copy in the old DB_CONFIG file:

$ cd hdb/db
$ cp -p ../../hdb.2007-12-07-out-of-sync/db/DB_CONFIG .
Import the ldap master data. This may take minutes (or even hours), depending on the amount of data.
$ ~/openldap/sbin/slapadd -q -b "" -F /opt/zimbra/data/ldap/config -l /tmp/ldap-master.ldif

Then start the ldap service and run a test query.

$ ldap start
$ zmprov -l getAllServers

Related Articles

Verified Against: unknown Date Created: 12/7/2007
Article ID: Date Modified: 03/30/2015
Personal tools