cancel
Showing results for 
Search instead for 
Did you mean: 

Netbackup daily report

Steven05
Level 4

Hello
I'm not very good at scripting (shell: bash or ksh).
I solice your help to a daily report of the backup environment.

a report listing all servers backed up by success and failure with its own police the error code in the last 24 hours and the other ... I would launch this script every day of the week.

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions

cruisen
Level 6
Partner Accredited

Hello Steven05,

cd /usr/openv/netbackup/bin/admincmd/bperror -backstat -U -by_statcode -hoursago 24

should be sufficiant to run on a daily basis.

bperror.PNG

Best regards,

Cruisen

 

View solution in original post

4 REPLIES 4

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified
I have moved this post to the NetBackup forum for better visibility.

Will_Restore
Level 6

Take a look at OpsCenter. It does all the work for you. 

 

Genericus
Moderator
Moderator
   VIP   

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.

NetBackup 9.1.0.1 on Solaris 11, writing to Data Domain 9800 7.7.4.0
duplicating via SLP to LTO5 & LTO8 in SL8500 via ACSLS

cruisen
Level 6
Partner Accredited

Hello Steven05,

cd /usr/openv/netbackup/bin/admincmd/bperror -backstat -U -by_statcode -hoursago 24

should be sufficiant to run on a daily basis.

bperror.PNG

Best regards,

Cruisen