> On Nov 9, 2017, at 3:35 PM, Jim Richardson <j...@securit360.com> wrote:
> 
> 
> Any chance I can get a feature request in?  I would like to have all jobs 
> that complete with zero files and / or zero bytes to complete with Backup OK 
> – with warnings.  Currently these jobs complete with Backup OK. 
> 
>  


Instead, why not make add this check to your monitoring system?

I have this in use:

$ cat /usr/home/dan/bin/size-check-files
#!/bin/sh

BACKUPDIR="/usr/home/dan/backups"

# nothing to report
response=""

# all good
success=0

FILES="`/usr/bin/find ${BACKUPDIR} -size 0 | /usr/bin/grep -v /.NOBACKUP`"

# if any of these files are of size zero, bad.
for file in ${FILES}
do
  success=2
  response="$response ${file} has size zero. "
done

if [ $success -eq  0 ]
then
  echo OK. No zero-size files found.
else
  echo $response
fi

return $success

-- 
Dan Langille - BSDCan / PGCon
d...@langille.org




------------------------------------------------------------------------------
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

Reply via email to