Bogofilter migration & tuneup

Matthias Andree matthias.andree at gmx.de
Mon Dec 5 14:57:41 CET 2005


Robin Bowes <robin-lists at robinbowes.com> writes:

> I'm moving my mail server and am moving from bogofilter 0.93.5 to 1.0.0
>
> I understand that the way to migrate is to dump the word list (in the
> old version) and to reload it with the new one. Is this right?
>
> So, I'm using this command to dump the word list:
>
>  bogoutil.0.93  -d /path/to/.bogofilter.bak/wordlist.db  > wordlist.txt
>
> (bogoutil.0.93 is the bogoutil binary from the 0.93.5 package, copied
> onto my new machine).
>
> The thing is, wordlist.txt is currently around 4.7GB in size and
> growing! The original wordlist.db is 105MB.
>
> How can I reduce the size of the wordlist?

The wordlist.db file is likely corrupt and looping. If you have log
files for this wordlist.db, then running

    bogoutil.0.93 --db-recover=/path/to/.bogofilter.bak

should fix this.

If it does not, retry with --db-recover-harder or see doc/README.db for
other recovery strategies.

My apologies if the option is actually named differently, I haven't
looked at 0.93.5 in a while.

> One last thing, on the old machine, the .bogofilter directory "filled
> up" with loads of DB log files. I'm not really interested in keeping all
> of them. Is the correct way to keep these in check to use a cron task
> running "bogoutil --db-prune" ?

That would work with older bogofilter versions, you don't need this
after the upgrade though: 1.0.0 removes logs files automatically if they
are no longer of use (but can be configured to leave these behind if so
desired).


David,

should we run the verify method by default before dumping, and if verify
fails, either try recovery (on TXN) or request the user to use db_dump
instead (on traditional)?  This might be one non-bugfix item I'd be
willing to let into 1.0 as it improves robustness when users upgrade
from 1.0.X to 1.1 later.---Not that 1.1 were in sight though. :-)

We may also need a FAQ for common pitfalls during upgrade. I have these
two items so far:

- if lock tables overflow, point the user to db_resize and the right
  section of the README.db file

- before upgrading, make sure that the database verifies to avoid loops
  on bogoutil -d.

Incidentally, both support question were with 0.93.5. I wonder if that's
something to do with what versions are in use.

Humans tend to suspect a pattern behind two similar events...

Regards,

-- 
Matthias Andree



More information about the Bogofilter mailing list