You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Patrick O'Halloran <po...@innocor.com> on 2004/04/01 22:22:23 UTC
Importing 2.55 database files to version 2.6
Hello,
I've just installed spamassassin 2.63 and the DB_File module on a Debian
(Woody) system. I want to import my old database files into the DB_File
system. My old database files are from spamassassin 2.55.
When I ran the sa-learn --import --dbpath <path to old database files> it
complained that it couldn't find bayes_seen and bayes_toks. My old database
files were called _seen and _toks respectively. I renamed them so it could
find what it was looking for. Should I have done that?
So after I renamed them and ran the sa-learn --import --dbpath <path to old
database files> command again I get the following listing when it's done:
-rw------- 1 root root 2.6M Apr 1 16:17 bayes_seen
-rw------- 1 root root 648k Apr 1 16:17 bayes_toks
-rw-r--r-- 1 root root 2.5M Apr 1 16:17 old_bayes_seen
-rw-r--r-- 1 root root 648k Apr 1 16:17 old_bayes_toks
However, once I run the sa-learn rebuild with the -D option I see this:
-----Snippet of interesting debug info------
debug: using "/usr/local/share/spamassassin" for default rules dir
debug: using "/etc/mail/spamassassin" for site rules dir
debug: using "/root/.spamassassin/user_prefs" for user prefs file
debug: bayes: no dbs present, cannot scan: /innocor/spamassassin_bayes/_toks
debug: Score set 0 chosen.
debug: Initialising learner
debug: Initialising learner
debug: Syncing Bayes journal and expiring old tokens...
debug: lock: 21626 created
/innocor/spamassassin_bayes/.lock.as2.innocor.com.21626
debug: lock: 21626 trying to get lock on /innocor/spamassassin_bayes/ with 0
retries
debug: lock: 21626 link to /innocor/spamassassin_bayes/.lock: link ok
debug: bayes: 21626 tie-ing to DB file R/W /innocor/spamassassin_bayes/_toks
debug: bayes: 21626 tie-ing to DB file R/W /innocor/spamassassin_bayes/_seen
debug: bayes: found bayes db version 0
debug: bayes: new db, set db version 2 and 0 tokens
debug: Syncing complete.
debug: bayes: 21626 untie-ing
debug: bayes: 21626 untie-ing db_toks
debug: bayes: 21626 untie-ing db_seen
debug: bayes: files locked, now unlocking lock
------------------------------------------------
If I then do an "ls" on my directory I get this output:
-rw------- 1 root root 12k Apr 1 16:18 _seen
-rw------- 1 root root 12k Apr 1 16:18 _toks
-rw------- 1 root root 2.6M Apr 1 16:17 bayes_seen
-rw------- 1 root root 648k Apr 1 16:17 bayes_toks
-rw-r--r-- 1 root root 2.5M Apr 1 16:17 old_bayes_seen
-rw-r--r-- 1 root root 648k Apr 1 16:17 old_bayes_toks
So it would seem that somehow it doesn't know about the imported database
data. And it's still looking for the old _toks and old _seen filenames
rather than the new bayes_toks and bayes_seen.
Any ideas/suggestions?
Thanks for your time!
Patrick O'Halloran
Re: Importing 2.55 database files to version 2.6
Posted by Theo Van Dinter <fe...@kluge.net>.
On Thu, Apr 01, 2004 at 03:22:23PM -0500, Patrick O'Halloran wrote:
> When I ran the sa-learn --import --dbpath <path to old database files> it
> complained that it couldn't find bayes_seen and bayes_toks. My old database
> files were called _seen and _toks respectively. I renamed them so it could
> find what it was looking for. Should I have done that?
That's fine, although I'd fix your config to look for the proper
bayes-prefixed names.
> -rw------- 1 root root 12k Apr 1 16:18 _seen
> -rw------- 1 root root 12k Apr 1 16:18 _toks
>
> So it would seem that somehow it doesn't know about the imported database
> data. And it's still looking for the old _toks and old _seen filenames
> rather than the new bayes_toks and bayes_seen.
Well, it looks like the config files weren't read, so it went looking
for the default bayes_* names, but then sa-learn (non import) uses the
config files, so then looks for _* names.
> Any ideas/suggestions?
I'd fix the config to aim at the standard names, or just rename the
bayes_* files to _* ...
--
Randomly Generated Tagline:
"Low probability events do happen, which is why people still play the lottery."
- Elizabeth Zwicky at LISA '99