Copying db to another host

David Relson relson at osagesoftware.com
Mon Apr 25 01:18:32 CEST 2005


On Sun, 24 Apr 2005 16:00:46 -0700
Bill Wohler wrote:

> I just upgraded bogofilter on my mail host (to 0.93.5 from Debian's
> backports.org). It used to be a non-transactional version .91. My
> laptop on the other hand uses a transactional 0.94.
> 
> Despite the difference in versions and database type, I used to be
> able to simply copy wordlist.db from my laptop (where training occurs)
> upstream to my mail host (where filtering occurs). However, after I
> upgraded bogofilter on my mail host, this stopped working.

BerkeleyDB's log files underwent a format change between 4.2 and 4.3.
A 4.3 linked program cannot read a 4.2 created log file.


> First I copied my entire .bogofilter directory to my mail host. That
> didn't work:
> 
>   [wohler at tassie:502]$ bogoutil --db-verify wordlist.db
>   Ignoring log file: ./log.0000000075: unsupported log version 10
>   PANIC: Invalid argument
>   Ignoring log file: ./log.0000000075: unsupported log version 10
>   PANIC: Invalid argument
>   bogoutil: Cannot recover environment ".": DB_RUNRECOVERY: Fatal error, run database recovery
> 
> Then I ran "bogoutil -d wordlist.db >| wordlist.txt" on my laptop,
> copied wordlist.txt to my mail host, and then ran "bogoutil -l
> wordlist.db < wordlist.txt" on my mail host. That worked! (I also had
> to run "bogoutil --db-prune ~/.bogofilter" to remove 75 MB of log
> files.)

"bogoutil -d ... | bogoutil -l ..." is the right way to create a new
database.  As -d (dump) produces a text file that -l (load) reads, the
operations can be done safely on separate machines.

> Before I update my scripts that update my bogofilter database on my
> mail host, could someone please confirm that this is an acceptable
> procedure to copy a bogofilter database to another host.

Summary:  you've got the right approach.

David




More information about the Bogofilter mailing list