Didn't help. As well as "set -e".
The script basically does the following. Make a list of databases with
mysqlshow and then do mysqldumps for all the db found in the list. So
the important part here is:

for i in `cat list.txt`
do

 /usr/bin/mysqldump $i 

   if [ $? != 0 ]; then
        exit 1

   fi

done

exit 0

I still got "Backup OK of...".
The error message if mysqldump is "ClientRunBeforeJob: mysqldump: Got
error: 1449: The user specified as a definer ('xyz'@'%') does not exist
when using LOCK TABLES"

The result is a dump with a few kb. Anyway, the problem is that I can't
see that problem at once. A "Termination: Backup OK -- with
warnings" would be just fine as I could easily filter those mails to
appear in my inbox.

Oliver

> On Mon, Sep 19, 2011 at 8:58 AM, Oliver Hoffmann <o...@dom.de> wrote:
> > Hello list,
> >
> > 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.
> 
> John
> 



------------------------------------------------------------------------------
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to