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

Re: Re[6]: openldap db wiped?





--On Monday, January 10, 2005 5:56 PM +0200 Karolis Dautartas <list@public.lt> wrote:

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 QGM> time.

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)
or
will it NOT write the data to disk, but give me the ability to recover
it later with db_recover?

It is supposed to do a checkpoint of the DB, causing the data stored in the log files to get written out to the *.bdb files in your DB directory.


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
records :)

Sounds useful, but hopefully you will never have to use it again. ;)

--Quanah

--
Quanah Gibson-Mount
Principal Software Developer
ITSS/Shared Services
Stanford University
GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html

"These censorship operations against schools and libraries are stronger
than ever in the present religio-political climate. They often focus on
fantasy and sf books, which foster that deadly enemy to bigotry and blind
faith, the imagination." -- Ursula K. Le Guin