How to recover Corrupted OpenLDAP Database | Reindex

How to recover Corrupted or Crashed OpenLDAP Database:

If your LDAP DB got corrupted or showing unclear shutdown, then you can recover it manually using the below method.

Stop Ldpa service first

#service slapd stop

Take the database backup
#tar -cvzf ldap.tar.gz /var/lib/ldap/*

LDAP Database Recovery Method

Method 1

Run the following command. This will recover the LDAP Database.
#/usr/sbin/slapd_db_recover -v -h /var/lib/ldap
Start ldap service
#service slapd start

Method 2

If the above method was not recovering the ldap db, then try to re index the database.
#service slapd stop
#cd /var/lib/ldap
#chown -R ldap.ldap *
#service slapd start

FOLLOW US :-    


Post a Comment