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

RE: Berkeley DB4 backend question

> -----Original Message-----
> From: owner-openldap-software@OpenLDAP.org
> [mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of Tony Earnshaw

> Specifically: I've read as much of the docs that come with Berkeley DB4
> and openldap 2.1.3. Plus Adam's ldapv3.pdf, IBM's stuff and much else.
> But the possibilities of DB4 leave me breathless. I've already
> discovered I can make hot tar and cpio backups, shut down slapd, delete
> the whole database and restore it with impunity.

tar and cpio, yes. I should point out that the docs have always stated that
you should not use the slap tools while slapd is running. In the past,
when it was just back-ldbm, this was simply because slapd maintained a
whole-file lock on the ldbm database, and so the tools wouldn't be able
to do anything. With back-bdb, locking is much more fine-grained. However,
there is a bug (fixed in HEAD) such that invoking any slap tools while slapd
is running will corrupt the database. With the fix, you can safely run
slapcat to do a hot backup while slapd is running. I think the Berkeley
utility would do just as well. I wouldn't try to use db_load or slapadd on
a running database though.
> However, there is much specific to the openldap DB4 implementation
> that's not documented. Berkeley's docs stress that they cover libraries,
> not an implementation.
> For example, the database transaction log file is growing and I can't
> find anything about log rotation. Database files are growing, don't know
> how to rid them of faults. Etc. etc. I wouldn't know how BDB 4 differs
> from BDB 3, and I don't know if there are relevant docs on the latter.
> Can anyone point me to docs that cover the above, missing, openldap DB4
> database administration?

All of those questions are, in fact, Berkeley-specific issues, and are
not particular to OpenLDAP. Start here

Click on "Programmer's Tutorial and Reference Guide." Scroll down to
section 9, "Berkeley DB Transactional Data Store Applications". Click on
item 15, "Database and log file archival" and read. Then read items 16
and 17 while you're at it, "Log file removal" and "Recovery procedures."

Finding the differences between BDB 4 and BDB 3? Start at the same URL
above. Click on "Release Patches and Change Logs". Most of these documents
are bundled with the BDB source code, so if you have BDB then the docs
are already at your fingertips.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support