You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Chris <cp...@embarqmail.com> on 2011/10/09 15:31:16 UTC

sa-learn --backup

I've been running the above command as a cronjob nightly for years now
suddenly in the past few days I've been getting this as the output of
the cronjob:

bayes: cannot open bayes databases /home/chris/.spamassassin/bayes_*
R/W: lock failed: Interrupted system call
ERROR: Bayes backup returned an error, please re-run with -D for more
information

The command line I'm using is:

cd /home/chris/.spamassassin 
/usr/local/bin/sa-learn --backup > /home/chris/SABackup/backup.txt

Running with -D shows nothing and running from the command line works
fine. What could be causing the error output?

-- 
Chris
KeyID 0xE372A7DA98E6705C
31.11°N 97.89°W (Elev. 1092 ft)
08:23:40 up 7 days, 16:34, 1 user, load average: 0.34, 0.31, 0.22


Re: sa-learn --backup

Posted by Bowie Bailey <Bo...@BUC.com>.
On 10/9/2011 9:31 AM, Chris wrote:
> cd /home/chris/.spamassassin
> /usr/local/bin/sa-learn --backup > /home/chris/SABackup/backup.txt
 
Out of curiosity, is there a reason for the 'cd'?  sa-learn gets the
database path from the config (or defaults to ~/.spamassassin/bayes). 
The current directory is irrelevant. 
 
-- 
Bowie

Re: sa-learn --backup

Posted by Chris <cp...@embarqmail.com>.
On Mon, 2011-10-10 at 01:03 +0100, RW wrote:
> On Sun, 09 Oct 2011 08:31:16 -0500
> Chris wrote:
> 
> > I've been running the above command as a cronjob nightly for years now
> > suddenly in the past few days I've been getting this as the output of
> > the cronjob:
> > 
> > bayes: cannot open bayes databases /home/chris/.spamassassin/bayes_*
> > R/W: lock failed: Interrupted system call
> > ERROR: Bayes backup returned an error, please re-run with -D for more
> > information
> > 
> > The command line I'm using is:
> > 
> > cd /home/chris/.spamassassin 
> > /usr/local/bin/sa-learn --backup > /home/chris/SABackup/backup.txt
> > 
> > Running with -D shows nothing and running from the command line works
> > fine. What could be causing the error output?
> > 
> 
> Have you tried changing the crontab entry to:
> 
> sa-learn -D --backup > /home/chris/SABackup/backup.txt 2>/home/chris/SABackup/debug
> 
> 
Thanks, the cronjob ran ok last night, I'll keep an eye on it and check
the debug output next time it fails.


-- 
Chris
KeyID 0xE372A7DA98E6705C
31.11°N 97.89°W (Elev. 1092 ft)
09:55:37 up 8 days, 18:05, 1 user, load average: 0.32, 0.59, 0.52


Re: sa-learn --backup

Posted by RW <rw...@googlemail.com>.
On Sun, 09 Oct 2011 08:31:16 -0500
Chris wrote:

> I've been running the above command as a cronjob nightly for years now
> suddenly in the past few days I've been getting this as the output of
> the cronjob:
> 
> bayes: cannot open bayes databases /home/chris/.spamassassin/bayes_*
> R/W: lock failed: Interrupted system call
> ERROR: Bayes backup returned an error, please re-run with -D for more
> information
> 
> The command line I'm using is:
> 
> cd /home/chris/.spamassassin 
> /usr/local/bin/sa-learn --backup > /home/chris/SABackup/backup.txt
> 
> Running with -D shows nothing and running from the command line works
> fine. What could be causing the error output?
> 

Have you tried changing the crontab entry to:

sa-learn -D --backup > /home/chris/SABackup/backup.txt 2>/home/chris/SABackup/debug