Migrate bayes database to new machine

Nathan Johanson nathan at TCPNETWORKS.NET
Tue Dec 16 05:05:16 GMT 2003


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...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mailscanner.info/pipermail/mailscanner/attachments/20031215/4eb7a3dd/attachment.html


More information about the MailScanner mailing list