[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: bdb backend - reliable or not?

Atom Powers wrote:
> Tomasz Chmielewski wrote:
> > Atom Powers wrote:
> >
> > (...)
> >
> >> Then put the db_recover command in your start-up script, and/or tune
> >> BDB so that it can survive a crash more easily.
> >
> > Is it OK if I put "db_recover" before each slapd startup? I guess it
> > should be avoided.
> > In that case, how can I detect that the server crashed unexpectedly, and
> > script "db_recover" run?
> > Should I only look at existing "alock" file before starting slapd, and
> > if it's there, assume something bad happened, and run "db_recover"?
> I just put it in the start-up script, to run every time slapd
> (re)started. If the database wasn't corrupt, no problems would need
> fixing, so db_recover didn't do anything.

The db_recover command will unconditionally delete the Berkeley DB
environment files. On small databases that doesn't mean much, but on large
ones it will slow the startup and you lose the benefit of the cache loading
that occurred during the previous run so initial performance is affected.

> Disclaimer: This was with an older version of OpenLDAP, I plan on having
> enough redundancy with the new system to detect and recover from any
> problems manually.


Matthew Hardin
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP: