Importing LDAP data from master to replica 6.0: Difference between revisions
No edit summary |
No edit summary |
||
(14 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{BC|Community Sandbox}} | |||
__FORCETOC__ | |||
<div class="col-md-12 ibox-content"> | |||
=Importing LDAP data from master to replica 6.0= | |||
{{KB|{{Unsupported}}|{{ZCS 6.0}}||}} | |||
{{Archive}}{{WIP}} | |||
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. | 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 [[http://wiki.zimbra.com/wiki/Importing_LDAP_data_from_provider_to_replica reload replicas for out of sync data]] for ZCS 8. | |||
==On the ZCS node where the ldap master is running== | ==On the ZCS node where the ldap master is running== | ||
Line 6: | Line 14: | ||
$ ~/libexec/zmslapcat /tmp | $ ~/libexec/zmslapcat /tmp | ||
=On the ZCS node where the ldap replica is running== | ==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''). | 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 | # su - zimbra | ||
Line 14: | Line 22: | ||
$ ldap stop | $ 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 . | |||
$ ~/openldap/sbin/slapadd -b "" -F /opt/zimbra/data/ldap/config -l /tmp/ldap-master.ldif | 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. | Then start the ldap service and run a test query. | ||
Line 30: | Line 39: | ||
==Related Articles== | ==Related Articles== | ||
[[LDAP]] | * [[LDAP]] | ||
[[Promoting_Replica_to_LDAP_Master|Promoting Replica to LDAP Master]] | * [[Promoting_Replica_to_LDAP_Master|Promoting Replica to LDAP Master]] | ||
[[Performance_Tuning_Guidelines_for_Large_Deployments|Performance Tuning Guidelines for Large Deployments]] | * [[Performance_Tuning_Guidelines_for_Large_Deployments|Performance Tuning Guidelines for Large Deployments]] | ||
[http:// | * [http://www.openldap.org/software/man.cgi?query=slapcat&apropos=0&sektion=0&manpath=OpenLDAP+2.4-Release&format=html slapcat manual page] at openldap.org | ||
[http:// | * [http://www.openldap.org/software/man.cgi?query=slapadd&apropos=0&sektion=0&manpath=OpenLDAP+2.4-Release&format=html slapadd manual page] at openldap.org | ||
Line 42: | Line 51: | ||
[[Category:Pending Certification]] | [[Category:Pending Certification]] | ||
[[Category:LDAP]] | [[Category:LDAP]] | ||
[[Category:ZCS 6.0]] | |||
[[Category:ZCS 7.0]] |
Latest revision as of 23:42, 11 July 2015
Importing LDAP data from master to replica 6.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 master.domain.com).
# su - zimbra $ scp zimbra@master.domain.com:/tmp/ldap.bak /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
- slapcat manual page at openldap.org
- slapadd manual page at openldap.org