[Date Prev][Date Next]
Re: openldap db wiped?
>>>> QGM> Have you tried running "db_recover" (assuming you are using bdb)?
>>>> QGM> What version of OpenLDAP are you using?
>>>> QGM> Also, you probably want to use the "checkpoint" command in your
>>>> slapd.conf QGM> to force the database to checkpoint at times other than
>>>> I have tried it after you suggested: no help :)
>> QGM> You haven't answered the version question. ;)
>> Hey, I have no experience with openldap, so I did:
>> "strings log.0000000001" | more
>> and I see some pieces of the data that is missing. This gives me a
>> hope that I can still get those lost records ;)
QGM> Well, "db_recover" is the command that is supposed to recover the data from
QGM> the log files and write it out to the DB.
QGM> I would try making sure slapd is stopped, and then running "db_recover"
QGM> twice in a row. Sometimes it needs to recreate the DB environment the
QGM> first time it is run, before it'll do the rest of the recover.
QGM> Again, to avoid getting into this situation in the future, I suggest adding
QGM> the "checkpoint" directive to your slapd.conf, which will have OpenLDAP
QGM> checkpoint the database on a periodic basis, rather than just at shutdown
I will probably look like a dummy here but I can't understand one
thing: this "checkpoint" directive (I have it set for 5 minutes now):
will it write the data to disk every 5 minutes (and in case of crash,
I would have my data almost up-to-date)
will it NOT write the data to disk, but give me the ability to recover
it later with db_recover?
By the way, to get the contents of my previously crashed DB, I had to
write a perl script which parses the log file and generates an LDIF
according to that log. Not very nice way to do it, but I have the