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

2011-09-19 Thread Oliver Hoffmann
Ben, you're right, it's directing in a bash script direction. So, coming back to bacula, I'd better like to find a way of communication between a ClientRunBeforeJob error and the Termination/mail-subject. With such a solution tinkering around with every script would be obsolete. Your trick did no

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

2011-09-19 Thread Jeremy Maes
Op 19/09/2011 16:47, Oliver Hoffmann schreef: >> On Mon, Sep 19, 2011 at 10:23 AM, Oliver Hoffmann wrote: This would see the whole job fail without backing anything else up though, no? Although that might be appropriate in some, cases, I think the OP wanted the job to complete but

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

2011-09-19 Thread Oliver Hoffmann
> On Mon, Sep 19, 2011 at 10:23 AM, Oliver Hoffmann wrote: > >> This would see the whole job fail without backing anything else up > >> though, no?  Although that might be appropriate in some, cases, I > >> think the OP wanted the job to complete but present an easy to pick > >> out visual indicat

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

2011-09-19 Thread John Drescher
On Mon, Sep 19, 2011 at 10:23 AM, Oliver Hoffmann wrote: >> This would see the whole job fail without backing anything else up >> though, no?  Although that might be appropriate in some, cases, I >> think the OP wanted the job to complete but present an easy to pick >> out visual indicator that it

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

2011-09-19 Thread Oliver Hoffmann
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

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

2011-09-19 Thread Oliver Hoffmann
> This would see the whole job fail without backing anything else up > though, no? Although that might be appropriate in some, cases, I > think the OP wanted the job to complete but present an easy to pick > out visual indicator that it wasn't a clean run. Exactly! > I can appreciate this need a

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

2011-09-19 Thread Jeremy Maes
Op 19/09/2011 16:00, Ben Walton schreef: > Excerpts from John Drescher's message of Mon Sep 19 09:27:54 -0400 2011: > >> Get your script to return a non zero exit status on database error. > This would see the whole job fail without backing anything else up > though, no? Although that might be app

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

2011-09-19 Thread Ben Walton
Excerpts from John Drescher's message of Mon Sep 19 09:27:54 -0400 2011: > Get your script to return a non zero exit status on database error. This would see the whole job fail without backing anything else up though, no? Although that might be appropriate in some, cases, I think the OP wanted t

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

2011-09-19 Thread Konstantin Khomoutov
On Mon, 19 Sep 2011 09:27:54 -0400 John Drescher 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. > >

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

2011-09-19 Thread Jeremy Maes
Op 19/09/2011 15:27, John Drescher schreef: On Mon, Sep 19, 2011 at 8:58 AM, Oliver Hoffmann 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 I

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

2011-09-19 Thread John Drescher
On Mon, Sep 19, 2011 at 8:58 AM, Oliver Hoffmann 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

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

2011-09-19 Thread Oliver Hoffmann
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 eve