Bacula-users

Re: [Bacula-users] How to get notified about non-fatal errors

2011-12-19 09:12:39
Subject: Re: [Bacula-users] How to get notified about non-fatal errors
From: Oliver Hoffmann <oh AT dom DOT de>
To: bacula-users AT lists.sourceforge DOT net
Date: Mon, 19 Dec 2011 15:10:33 +0100
> Hi
> 
> Looking through the docs and searching the mailing list, I haven't
> found a solution to my problem yet:
> 
> A windows backup job is terminating normally, sometimes with a
> non-fatal error:
> 
> Error: Read error on file d:/Backup/backup_201112190102.bak.
> ERR=Nicht gen\374gend Systemressourcen, um den angeforderten Dienst
> auszuf\374hren
> 
> (FYI: I haven't found the cause for this yet, but it doesn't really 
> matter with regard to Bacula, see below)
> 
> I get a notification mail about this job because of a Messages
> resource:
> 
> mailcommand = "/usr/lib/bacula/bsmtp -h localhost -f \"\(Bacula\)
> %r\" -s \"Bacula: %t %e of %n %l\" %r"
> 
> The problem is that the subject line for this says:
> 
> Bacula: Backup OK of reha11-dbbak-job Full
> 
> Buried in the body of the mail there is the error mentioned above and
> in the summary:
> 
> Non-fatal FD errors:    2
> SD Errors:              0
> FD termination status:  OK
> SD termination status:  OK
> Termination:            Backup OK -- with warnings
> 
> How do I get this termination code (or some other form of warning) in 
> the subject line of the mail? Or how do I get the job to fail? I need 
> the file from the non-fatal error be backuped or at least be loudly 
> warned if it isn't fully backuped...
> 
> Thanks
> 
> 
> Mario
> 
> ------------------------------------------------------------------------------
> Learn Windows Azure Live!  Tuesday, Dec 13, 2011
> Microsoft is holding a special Learn Windows Azure training event for 
> developers. It will provide a great way to learn Windows Azure and
> what it provides. You can attend the event by watching it streamed
> LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
> 

Hi,

I had the same problem but with mysqldump. The Backup was always OK but
the dump was not. I tried different approaches but in the end I wrote a
small script which greps the log file.

For example
grep $jobid /var/log/bacula/log | grep -i> 'error:'> /tmp/$jobid.log
and then an email if there are errors.

The script is executed as "Command after job" on the server.

Would be nice to have the possibility to alter the subject of the
status mail depending on the result of a script. That way it would be
easier to catch such errors with bweb, webacula, or just by filtering
the mails from the bacula server.

Greetings,

Oliver













------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users