Migrate bayes database to new machine
Bart J. Smit
mailscanner at SMITS.CO.UK
Fri Dec 19 21:29:56 GMT 2003
MessageThanks Nathan,
I guess the dump / import cycle was ingrained from other database
migrations.
After a long an arduous dependency walk I managed to install the same
version of perl-DB_File rpm on RHES 3 as I had on RH8.0 and the database
rebuild went through without errors. Mail latency through MS is now seconds
instead of minutes :-)
Thanks again,
Bart...
----- Original Message -----
From: Nathan Johanson
To: MAILSCANNER at JISCMAIL.AC.UK
Sent: Tuesday, December 16, 2003 5:05 AM
Subject: Re: Migrate bayes database to new machine
I recently migrated a bayes db to a new server. The following worked for me:
1) Install the same version of SpamAssassin on both machines. You also want
to make sure the DB_FIle perl module is at (or near) the same version
number, as well as any associated DB3 packages. I migrated from RH 7.2 to
RHEL ES 2.1, so my perl installations and other packages were almost
identical.
2) Shutdown the MailScanner service and rebuild the bayes db on the old
machine.
I used the following command: sa-learn -D -p
/etc/MailScanner/spam.assassin.prefs.conf --rebuild
3) Copy the bayes db to the same location on the new machine (make sure the
permissions match). I store bayes in /var/spool/spamassassin/bayes and
indicated this in spam.assassin.prefs.conf.
4) Start the MailScanner services and check the logs for BAYES scores. You
can also run the above sa-learn command again (with the -D switch) to check
for any possible errors.
That's it!
Nathan
-----Original Message-----
From: Bart J. Smit [mailto:mailscanner at SMITS.CO.UK]
Sent: Monday, December 15, 2003 4:45 PM
To: MAILSCANNER at JISCMAIL.AC.UK
Subject: Migrate bayes database to new machine
I have built a new MS machine to relieve the strain on the humble hardware
of the old relay. Prior to cutting over, I would like to migrate the bayes
database to give the new box a running start. I tried these commands:
on the old box: sa-learn --dump all > /tmp/badump
copy this file to the new box and do: sa-learn --import /tmp/badump
This comes back with: # bayes upgrade_old_dbm_files: unable to find
bayes_toks and bayes_seen, stopping
I have tried with pointing both sa-learn commands to their respective
database paths (/root/.spammassasin/bayes) and preferences
(/etc/MailScanner/spam.assassin.prefs.conf). I have rebuilt the latest
spamassasin (2.61-1) from source RPM and upgraded it on both boxes, but
still I get the error.
I'm obviously missing something simple.
Any clues?
Bart...
More information about the MailScanner
mailing list