1

My current task is to migrate the content from one machine (source) to another (target). Both machines are identical. One is heavily used and the other is clean.

I already have all the files that are different between both machines and what files are not in the target (they must be copied from the source).

The problem is, how should I transfer the LDAP data?

Is that just a copy from one side to another or should I dump some data from some place and then reload it in the target?

Any good documentation on how to do that? I couldn't find any.

Note: I will worry about other stuff like DB later. Right now, my headache is LDAP.

0

There is standard LDAP migration procedure provided by the vendors of LDAP check for details/documentation from respective vendor's support or user forums or you could also try perl scripts/tools available for migration (caution: try the scripts on test server and apply on production servers)

Below link should help you to some extent

http://www.tldp.org/HOWTO/LDAP-HOWTO/ldapmigrationtools.html

0

I recently had the same problem. This answer at serverfault.com worked for me. Basically, these are the steps:

On the 'old' machine run the following commands to export the configuration and the data, respectively:

# service slapd stop
# slapcat -n 0 -l backup-ldap-config.ldif
# slapcat -n 1 -l backup-ldap-database.ldif

Install OpenLDAP on the new machine (no need to configure anything) and copy the two ldif backup files to it.

On the new machine, stop the slapd service and move the existing LDAP configuration out of the way:

# systemctl stop slapd
# mv /etc/ldap/{slapd.d,slapd.d-backup-after-fresh-install}

Create a new directory with the proper ownership and import the config part of the LDAP server:

# mkdir /etc/ldap/slapd.d
# chown openldap:openldap /etc/ldap/slapd.d
# slapadd -n 0 -F /etc/ldap/slapd.d -l backup-ldap-config.ldif
_#################### 100.00% eta   none elapsed            none fast!
Closing DB...
# chown -R openldap:openldap /etc/ldap/slapd.d

Import the data part of the backup and set the correct ownership:

# slapadd -n 1 -F /etc/ldap/slapd.d -l backup-ldap-database.ldif
*#################### 100.00% eta   none elapsed             02s spd 148.9 k/s
Closing DB...
# chown -R openldap:openldap /var/lib/ldap

And start the LDAP server:

# systemctl start slapd

In my case, the old machine was running Ubuntu 12.04 and the new one runs Ubuntu 18.04.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.