Importing LDAP data from provider to replica: Difference between revisions

(Created page with "{{Article Infobox|{{admin}}|{{ZCS 8.0}}||}} = Copying a Provider database to the Replica = If an ldap replica is not in sync with the provider, it is possible to manually loa...")
(No difference)

Revision as of 19:08, 7 March 2013

Admin Article

Article Information

This article applies to the following ZCS versions.

ZCS 8.0 Article ZCS 8.0


Copying a Provider database to the Replica

If an ldap replica is not in sync with the provider, it is possible to manually load all of the data from the provider into the replica. There are two methods of doing this. Either using slapcat/slapadd, or using mdb_copy.

Using slapcat/slapadd to reload the replica

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 master.domain.com).

# su - zimbra
$ scp zimbra@master.domain.com:/tmp/ldap.bak /tmp/ldap-master.ldif

Stop the ldap service.

$ ldap stop

As root, 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.

$ exit
# mv /opt/zimbra/data/ldap/hdb /opt/zimbra/data/ldap/hdb.2007-12-07-out-of-sync
# mkdir -p /opt/zimbra/data/ldap/hdb/db
# mkdir -p /opt/zimbra/data/ldap/hdb/logs
# chown -R zimbra:zimbra /opt/zimbra/data/ldap/hdb

Copy in the old DB_CONFIG file:

# cd /opt/zimbra/data/ldap/hdb/db
# cp -p ../../hdb.2007-12-07-out-of-sync/db/DB_CONFIG .

As the zimbra user, import the ldap master data. This may take minutes (or even hours), depending on the amount of data.

# su - zimbra
$ ~/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: https://wiki.zimbra.com/index.php?title=Importing_LDAP_data_from_provider_to_replica Date Modified: 2013-03-07



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