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

Re: Database corruption after abrupt shutdown

On Wed, Feb 27, 2002 at 09:15:17AM -0800, Jason Heiss wrote:
> Feb 27 09:02:46 typhoon slapd[231]: ldbm: ==> dn2id.dbb: unexpected file type or format
> Feb 27 09:02:46 typhoon slapd[231]: <= dn2id could not open dn2id.dbb 
> I can't find any matches for this error in the archives for this mailing
> list, the FAQ or Google.  I'm assuming the database got corrupted and I'm
> curious if anyone has suggestions for how to go about fixing it?

well, just restore the backup?  .. ehrm.. :)

More seriously; IIUC dn2id.dbb is a generated index, the database is
contained in id2entry.dbb (or, gdbm in my case). So if that file is
intact, you should be able to recover the database.

> FWIW, both slapcat and slapindex say the same thing:
> > sudo slapcat
> slapcat: could not open database.

Why cant it open the database? The file is lost? File corrupt? 
slapd is running?

Try strace'ing slapcat and try to see the cause of the error.
check the size of the databases files, do they look reasonably large?
(i.e. maybe they became truncated in the crash)

Has slapcat / slapindex worked before the crash?

Maybe you keep slapd.conf in a nonstandard location, and need to specify
this path to slapcat..

> Jason