Hello my dears,

I have a question about my approach. I want to migrate the backend database 
of my OpenLDAP server from HDB to MDB. I would do this as follows:

Backup my LDAP
nice slapcat -n 0 > ${BACKUP_PATH}/config.ldif
nice slapcat -n 1 > ${BACKUP_PATH}/meinedomain.local.ldif
cp -rp /var/lib/ldap /var/lib/ldap.bak
cp -rp /etc/ldap/slapd.d /etc/ldap/slapd.d.bak
 
Modify entries in these two dates with a text editor from hdb to mdb.
Stop the OpenLDAP service
sudo systemctl stop sldap.service
 
Delete the directories of the LDAP tree
rm -r /var/lib/ldap /etc/ldap/slapd.d
 
Rebuild the LDAP database
sudo dpkg-reconfigure slapd
 
In the options select the database MDB and leave everything else as before. 
Then restore the LDAP tree.
sudo slapadd -F /etc/ldap/slapd.d -n 0 -l ${BACKUP_PATH}/config.ldif
sudo slapadd -F /etc/ldap/slapd.d -n 1 -l 
${BACKUP_PATH}/meinedomain.local.ldif
 
Restart the OpenLDAP service
sudo systemctl restart slapd.service
 
That should have been my opinion. Can you think of something else I have to 
pay attention to?
 
Greetings from Stefan Harbich


Reply via email to