bf_compact

David Relson relson at osagesoftware.com
Fri May 13 02:59:20 CEST 2005


On Thu, 12 May 2005 22:28:08 +0100
R Kimber wrote:

> I've been experimenting with bf_compact
> 
> First, I tried, from the .bogofilter directory,
> bf_compact .
> this didn't work fully
> and produced
> mv: cannot move `.' to `..old': Device or resource busy
> which I believe has already been noted
> 
> So I installed 0.94.11
> 
> Eventually, I read the FAQ at
> http://bogofilter.sourceforge.net/faq.shtml#compact-database
> which recommended:
> 
> bf_compact ~/.bogofilter wordlist.db
> 
> However, this was a disaster, since it not only screwed up the
> wordlist, but deleted all the other files in the .bogofilter
> directory including the config file.
> 
> What should I have done?
> 
> - Richard.

H'lo Richard,

The purpose of "bf_compact dir" is to compact the wordlist(s) in
directory "dir".  For database security, a new directory is created to
hold the newly compacted wordlists.  Once the compacting is done, the
original directory, i.e. "dir", is renamed to "dir.old" and the new
directory is renamed to "dir".  A special check is included for file
DB_CONFIG and it's copied to the new directory.  Other files in "dir"
are left unchanged, hence end up in "dir.old".

Given the directory renaming, "bf_compact ." is problematical :-<

HTH,

David




More information about the Bogofilter mailing list