so my server crashed and my backup is a couple of weeks old :(. so....
I have the old files that can be found in /var/lib/ldap
How can i recover my db, or export them in a ldif files.
Tnx all Zlatko
This question came from our site for professional and enthusiast programmers.
I'm assuming an openldap instance here, but the slapcat utility may prove useful. A few years ago I was running an ldap instance that was frequently blowing up its indices, so its fairly common to slapcat the database to a big ldif file, move out the db files, and then slapadd to regenerate the db from the ldif.
One of our machines running a third party system that used LDAP for authentication amongst other things has upset its LDAP setup before now (I've never worked out how as there are generally no graceless stops that I can account for).
The following has always worked to sort it:
(replacing any paths with correct ones for your system, of course)
If this fails, you have a backup from step 2 to roll back to ready to try something else. It might be worth taking a full system backup now before taking any steps to fix the issue, in case the attempts to fix things make something worse.