You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Sven Riedel <sr...@baghus.net> on 2005/06/13 11:01:32 UTC

Frequent database breakage - recovery?

Hi,
my bayesian databases are frequently broken (why, I'm not sure - 
spamassassin is called via amavisd-new, the training takes place
via sa-lean and nothing else is accessing the databases).

I've included db_recover to my amavisd-new startup script, to
migitate the breakages. Somehow db_recover doesn't seem to be
able to find the databases, since it reports that the database
is ok while amavis complains about an inconsistent database.

This is what I'm doing in the startup script:

   amavis_db_dir=/var/amavis_root/db
   bayes_db_dir=/var/amavis_root/etc/mail/spamassassin/bayes
   awl_db_dir=/var/amavis_root/etc/mail/spamassassin/awl

   for db in $amavis_db_dir/cache.db \
             $amavis_db_dir/cache-expiry.db \
             $amavis_db_dir/nanny.db \
             $amavis_db_dir/snmp.db \
             $bayes_db_dir/bayes_seen \
             $bayes_db_dir/bayes_toks \
             $awl_db_dir/awl ; do
      if [ -e $db ] ; then
         /usr/bin/db4.3_verify $db
         if [ $? -ne 0 ] ; then
            if [ $db = $bayes_db_dir/bayes_seen -o \
                 $db = $bayes_db_dir/bayes_toks -o \
                 $db = $awl_db_dir/awl ] ; then
                 /usr/local/sbin/sa_db_reset
            else 
               rm -f $db
            fi
	else 
		# initialize the database if it doesn't exist
	fi
   done

Can anyone tell me how I'm calling db_recover wrong? It doesnt
seem to have a parameter to tell it what database file to 
actually check.

Regs,
Sven

------------------------------------------

BAGHUS GmbH
EDV und Internetdienstleistungen

Staffelseestr. 2
81477 München

Tel.: 0 89 / 8 71 81 - 4 84
Fax.: 0 89 / 8 71 81 - 4 88

www.baghus.net, info@baghus.net
HRB: 144283, USt-IdNr: DE224865405

------------------------------------------