bogoutil question

Matthias Andree matthias.andree at gmx.de
Tue Jan 30 19:22:26 CET 2007


David Relson wrote:

> The BerkeleyDB system includes a verify utility.  It's name can be
> db_verify, db4.3_verify, etc.  The exact name depends on packager
> (distro).

So let's avoid it, since it's playing hide and seek, and we have this
better tool with constant name, bogoutil:

> Bogoutil's "--db-verify" option uses the verify capability in
> BerkeleyDB's shared library.  It doesn't use a separate executable, so
> it doesn't matter whether the verify utility is named db_verify,
> db_4.3_verify, or something else.

> The standalone utility may well be using different options than
> bogoutil's call to the verify function, so the results may differ.

To answer Richard's question directly (posed in a later message than the
one quoted here):

Forget about db_verify and thereabouts. Use only
bogoutil --db-verify foo.db (you must replace "foo.db" by your database
file and possibly path). Bogoutil is easier to find and does a better job.

Why? See, "bogoutil --db-verify foo.db" does the following:

1. lock the database for exclusive access
2. attempt recovery
3. only then verify consistency.

db_verify, in contrast, only does part of the work, namely step #3, so
it may report inconsistencies that are temporary if it is running while
bogofilter or bogoutil are modifying the database (which it does not
lock), and it may also report inconsistencies of transactionally
operated databases that are repairable, and that other bogo* programs
can and will automatically and transparently (i. e. they're not telling
you) repair (since db_verify does not attempt repair).

> If either verification method ("bogoutil --db-verify" or
> "db_verify") indicates a problem, I'd recommend rebuilding your
> database.

I'd say db_verify is deprecated for bogofilter end user purposes.
Its use is in my opinion as bogofilter's BerkeleyDB-adaptor-in-chief
discouraged for (a) lack of locking, (b) lack of recovery attempt.

Instead, we should recommend using ONLY bogoutil --db-verify, and that's
in fact the only suggestion doc/README.db makes (that latter is silent
about db_verify).


With respect to support procedures, I also suggest not typing these few
lenghty db_verify-renamed-this-and-that und bogoutil -d |bogoutil -l
nitty-gritty over and over, but instead pointing our users to
doc/README.db and relevant sections therein. It's much more verbose and
IMO helpful anyways and saves support time - and might in the long run
teach users to check their documents before asking, if they've seen that
the information they're after is already on their computers, before
they've even typed their question.

HTH,
Matthias



More information about the Bogofilter mailing list