Hello everyone, Sorry I am a few days late on this, but attached is a script called "bacula_warn_on_zero-20171116.sh"
It takes one to three command line parameters: USE: ./bacula_warn_on_zero-20171116.sh jobid [debug] [zero_incremental_ok] A jobid is required, debug just logs everything to stdout, and zero_incremental_ok allows Incremental backup jobs with zero files or zero bytes to be ignored. A good example use case is a job I have that backs up a directory of CDROM ISO files. This does not change much so the nightly incremental job for this often has zero files and zero bytes. This script is probably best run from a RunScript {} (RunsWhen = after) in a Job resource to alert admins as soon as a job is finished if it completed with zero files or zero bytes. Of course it may also be run manually or from a cron job. This script ONLY considers jobs of type "Backup" which have completed "T" or "W" - Bacula of course already warns about other backup job statuses, so I ignore them all. Currently, Full backup jobs that terminate "T" or "W" must not have zero files or zero bytes, and this script will send a warning email in these cases. Make sure to edit the system variables near the top. Please let me know if this is useful, or even more importantly, please let me know about any bugs or feature requests or enhancements. It will upload this to my website shortly, but I wanted to get it to the list as soon as I could. Best regards, Bill -- Bill Arlofski http://www.revpol.com/bacula -- Not responsible for anything below this line --
bacula_warn_on_zero-20171116.sh
Description: application/shellscript
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users