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

Re: Berkeley DB4 backend question



Hello Tony,

Friday, July 19, 2002, 1:05:00 PM, you wrote:

TE> For example, the database transaction log file is growing and I can't
TE> find anything about log rotation. Database files are growing, don't know
TE> how to rid them of faults. Etc. etc. I wouldn't know how BDB 4 differs
TE> from BDB 3, and I don't know if there are relevant docs on the latter.
TE> Can anyone point me to docs that cover the above, missing, openldap DB4
TE> database administration?

Nice to see someone going deep against the system entropy ;)
I didn't think about it, but You're right. BDB needs housekeeping.

First of all, install db-utils-4.x RPM (if You use RPM).
My SuSE comes with db-utils-4.0.14-64.

Read more about db_archive utility here:
http://www.sleepycat.com/docs/utility/db_archive.html

It gives You posibility to archive (backup or delete) transaction logs
unused at the moment on-the-fly, without shutting down slapd.

Read these also:
http://www.sleepycat.com/docs/utility/index.html
Note db_verify remarks regarding specific hashing functions.

Second, read more about BDB backend, slapd-bdb(5) manpage. You can set
Your own checkpoint policy using the following directive:

checkpoint <kbyte> <min>

This has the similar effect as db_checkpoint utility. By default my
transaction logs grew up to ten megs.

Well, now You can simply

$ db_archive | xargs bzip2 -9

or even

$ db_archive | xargs rm -f

or something else ;-) I've got five times compression ration on my 10M
logs. The bigger Your file, the better compression is.

You can set up replicas on different machines to reduce downtime.
Enjoy strong TLS, I made this in a `hard' way (both client and server
certificates are checked). Don't forget to set TLSCACertificateFile if
You don't want to spend the money for the certificate ;-)

Well, the most thing I like in OpenLDAP is it's ldapi:// URL scheme
for implementing fast UNIX sockets without IP overhead. This is
particulary usefull for some `local' tasks. OpenLDAP has it's own
control for setting desired file mode, `x-mod'.

OpenLDAP docs are incomplete. Always check manpages ldap.conf(5),
slapd.conf(5), slapd-XXX(5), etc. They contain more info than HTML
version of Administrator's Guide. The thing is the most complete doc
is the OpenLDAP code itself ;-)

bye
-- 
Best regards,
 Peter                            mailto:spam4octan@highway.ru