Just a really quick update from me today it may be known to many but I still get the question asked :- “My machine crashed and now the OpenLdap service won’t start up and I never backed it up, what can I do ?”.
First of all I must stress the importance of backing up though we all get hit from time to time with a recovery from hell, backing up OpenLdap is pretty simple and there is a script which does this for you, more details can be found on page 11 of the back up and recovery guide (backup guide) I find just backing up the openldap directory to be enough.
Anyway so what if you have not taken a backup well there is a utility called db_recover that sits in the openLDAP\bdb\bin\ directory, there is also documentation (openLDAP\bdb\docs\db_recover.html)
The format for this command line utility is :-
db_recover [-ceVv] [-h home] [-P password] [-t [[CC]YY]MMDDhhmm[.SS]]]
-c is perform a catastrophic recovery instead of normal
-v is run in verbose mode
-h is the directory to the database files which should be openLDAP\var\openldap-data
-t is the date you want to recover back to which is normally the last time that openldap was running ok, so if you wanted to recover back to 30th August 2008 17:45 the format would be 200808301745
More detailed information on the different parameters can be found in the html document but you will find you don’t really to need to know much more than above.
So just create your command line, run and most of the time you should be good to go.
Well that’s it told you it would be a quick update.