Check this out:
# $Header: mail_bp_reports.sh,v 1.2 97/09/18 10:32:30 twz Exp $
#
#bcpyrght
#***************************************************************************
#* Copyright 1993 - 1998 VERITAS Software Corporation, All Rights Reserved *
#***************************************************************************
#ecpyrght
#
# mail_bp_reports
#
# This script can be used by an adminstrator as a convenient way to mail
# the various NetBackup reports. It may be used in a crontab entry to
# have status mailed to you once per day.
#
# some caveats:
# -assumes binaries, scripts are located in the right places
# bperror
# cleanstats
# mail
# -not tried on all servers, some platforms may need slight modifications
#
# This is the command used to get the backup status and problem reports.
# PATH TO NB COMMANDS
BPERROR=/usr/openv/netbackup/bin/admincmd/bperror
BPREPORT=/usr/openv/netbackup/bin/admincmd/bpdbjobs
BPIMAGELIST=/usr/openv/netbackup/bin/admincmd/bpimagelist
BPMEDIALIST=/usr/openv/netbackup/bin/admincmd/bpmedialist
NBEMMCMD=/usr/openv/netbackup/bin/admincmd/nbemmcmd
I email this to myself every day:
# cat /var/adm/scripts/daily.rpt.ksh
#!/usr/bin/ksh
#
# get day of the week to determine hours to report
mydate=`date +%w`
if [ $mydate == 1 ]
then
h=72
else
h=24
fi
# generate report
/usr/openv/netbackup/bin/admincmd/bperror -U -backstat -hoursago $h -by_statcode > /usr/openv/tmp/bksum.txt
#
echo " " >> /usr/openv/tmp/bksum.txt
echo " " >> /usr/openv/tmp/bksum.txt
echo " Email generated by script /var/adm/scripts/daily.rpt.ksh on master "
echo " " >> /usr/openv/tmp/bksum.txt
echo " " >> /usr/openv/tmp/bksum.txt
# mail report
/usr/bin/mailx -s "Daily Backup Summary for last $h hours " Operations@company.com, NBAdmin@company.com, windows@company.com < /usr/openv/tmp/bksum.txt
You could likely look into options for the bperror report, to specify specfic policy type or clients. Planning in naming policies and schedules can allow you to get good grouping.