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

Re: server restart - lost data?



Hello,

Thank you for all your response. here is the version of openldap and db on the
fedora 3 system.

openldap-2.2.13-2
db4-4.2.52-6

after i posted my first message to this list, i ran db_recover in the ldap
data directory and it looked like it wiped out the whole database. so i have
to go back and recover the database from backup.

But still i am wondering how can i recover those 200 some entires that were
added in ldap, which were not written to the db, and which were lost after
server crash. I can manually add them again if recover is not possible, but
how would i prevent such thing from happening again.

thank you so much.
Shashank

Howard Chu (hyc@symas.com) wrote:
>
> Quanah Gibson-Mount wrote:
>
> >
> >
> > --On Friday, May 20, 2005 11:04 PM -0500 Jon Roberts
> > <jon@jonanddeb.net> wrote:
> >
> >> You should cd to your openldap directory and run the BDB utility
> >> db_recover before restarting slapd. See:
> >>
> >> http://www.sleepycat.com/docs/utility/db_recover.html
> >>
> >>> and what can i do to prevent this.
> >>
> >>
> >> Several recent threads on this list recommend you add a step to run
> >> db_recover in your slapd startup script, because crashes happen.
> >
> >
> > This only works if he's running OpenLDAP 2.1.x and later.  Most all
> > Fedora installations use 2.0.x, unfortunately.  So what would be most
> > useful is to know the version of OpenLDAP that is being used, because
> > advice cannot be properly suggested until it is.  Even if it is 2.1.x
> > or later, he could still be using the ldbm backend, which also means
> > the db_recover option wouldn't work.
>
> Actually, Fedora provides a fairly recent OpenLDAP release. And the
> original poster's slapd.conf showed he's using back-bdb, not ldbm. (And
> there was no back-bdb in OpenLDAP 2.0.) The db_recover advice given
> above was fine.
>
> --
>   -- Howard Chu
>   Chief Architect, Symas Corp.       Director, Highland Sun
>   http://www.symas.com               http://highlandsun.com/hyc
>   Symas: Premier OpenSource Development and Support
>
>