OpenLDAP
From ResonantWiki
[edit]
Disaster Recovery
OpenLDAP stores its files in /var/lib/ldap/, and we have text dump backups in /etc/ldap/ldifs/. If the primary storage in /var/lib/ldap/ becomes corrupt, the following steps can be taken (as root) to correct it:
- Stop slapd (/etc/init.d/slapd stop, or you may have to pkill -9 slapd)
- Attempt an in-place repair:
- cd /var/lib/ldap
- db4.3_recover .
- Try restarting slapd (/etc/init.d/slapd start).
- If that didn't work, you'll have to restore from backup. Kill slapd again.
- cd /var/lib
- mv ldap ldap-yyyymmdd
- mkdir ldap
- cd /etc/ldap/ldifs
- slapadd < backup-daily.ldif
- Restart slapd. If it isn't working at this point, you're in deeper trouble than I can get you out of with a quick explanation.

