Copying db to another host
Matthias Andree
matthias.andree at gmx.de
Mon Apr 25 02:33:46 CEST 2005
Bill Wohler <wohler at newt.com> writes:
> 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
This would require running the same Berkeley DB version (with same
compilation options) on both your server and your laptop computers
underneath bogofilter.
> 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.)
You can put "db-log-autoremove = Yes" in the configuration file to
have the log files removed automatically. Other than that, this is the
right way to portably copy data around.
NOTE! bogoutil -l merges the text file into the existing database,
adding counts for tokens that are already present, so you'll probably
need to "rm wordlist.db" on the mail host before using bogoutil -l,
otherwise, you'll register older tokens over and over. This, of course,
is not an option if you have several other training sources.
--
Matthias Andree
More information about the Bogofilter
mailing list