Migrate OpenLDAP to another server and/or version
If you need to migrate the contents of an OpenLDAP server into another server, then do the following:
- Copy database contents to a file:
# /etc/init.d/slapd stop # slapcat > database.ldif
- Copy the configuration file to the new server
NOTE: If migrating from a server with an old OpenLDAP version (configuration is in slapd.conf) to a newer version (configuration in a directory, like /etc/openldap/slapd.d), do the following in the new server to create the structure (slapd.conf is the file copied from the old server):# slaptest -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.d
- Recreate the database in the new server:
# slapadd -l database.ldif
Leave a Reply