Bacula-users

Re: [Bacula-users] Backup status OK, but mysql errors

2011-09-19 10:01:29
Subject: Re: [Bacula-users] Backup status OK, but mysql errors
From: Konstantin Khomoutov <flatworm AT users.sourceforge DOT net>
To: John Drescher <drescherjm AT gmail DOT com>
Date: Mon, 19 Sep 2011 17:59:20 +0400
On Mon, 19 Sep 2011 09:27:54 -0400
John Drescher <drescherjm AT gmail DOT com> wrote:

> > bacula does a ClientRunBeforeJob which is a mysqldump script. The
> > script returns an error (problem with Lock Tables) but the email has
> > the subject "Bacula: Backup OK of myclient-fd Incremental".
> > Even webacula shows an OK.
> > This is misleading and this way one would be forced to read every
> > status mail. Any (nice) ideas how to deal with it? All right, I
> > could alter my script or something but maybe there is a way to put
> > a keyword into the subject?
> >
> 
> Get your script to return a non zero exit status on database error.
I'd like to add that the easiest way to achieve this is to
add

set -e

at the beginning of the script (assuming it's a Unix shell script).
In this case the script will fail as soon as the first command
pipeline it runs exits with a non-zero exit code.

Actually, I think that a good programming practice is to always start a
shell script with `set -e -u`.

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry&reg; mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry&reg; DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users