Difference between revisions of "Importing LDAP data from master to replica"

(New page: 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. ==On the ZCS node where the ldap master is running== E...)
 
(Adding article footer and category)
Line 37: Line 37:
 
[http://man-wiki.net/index.php/8:slapadd slapadd manual page] at man-wiki.net
 
[http://man-wiki.net/index.php/8:slapadd slapadd manual page] at man-wiki.net
  
 +
 +
{{Article Footer|unknown|12/7/2007}}
  
 
[[Category:Pending Certification]]
 
[[Category:Pending Certification]]
 +
[[Category:LDAP]]

Revision as of 00:11, 20 February 2008

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.

On the ZCS node where the ldap master is running

Export an ldif of the master ldap database.

# su - zimbra
$ ~/openldap/sbin/slapcat -b "" -f ~/conf/slapd.conf -l /tmp/ldap-master.ldif

On the ZCS node where the ldap replica is running

Copy the file ldap-master.ldif from the master to the replica (this example assumes that the hostname of the master is "master.domain.com").

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

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. Consult the LDAP section of the performance tuning guide for tips on configuring the DB_CONFIG file if necessary.

$ exit
# mv /opt/zimbra/openldap-data /opt/zimbra/openldap-data.2007-12-07-out-of-sync
# mkdir /opt/zimbra/openldap-data
# chown zimbra:zimbra /opt/zimbra/openldap-data
# cp /opt/zimbra/openldap-data.2007-12-07-out-of-sync/DB_CONFIG /opt/zimbra/openldap-data/

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

# su - zimbra
$ ~/openldap/sbin/slapadd -b "" -f ~/conf/slapd.conf -l /tmp/ldap-master.ldif

Then start the ldap service and run a test query.

$ ldap start
$ zmprov --ldap getAllServers

Related Articles

LDAP
Promoting Replica to LDAP Master
Performance Tuning Guidelines for Large Deployments

slapcat manual page at man-wiki.net
slapadd manual page at man-wiki.net


Verified Against: unknown Date Created: 12/7/2007
Article ID: https://wiki.zimbra.com/index.php?title=Importing_LDAP_data_from_master_to_replica Date Modified: 2008-02-20



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