11-17-2010 11:45 AM
Hi Team,
I am looking to automate my backup success/failure jobs to mail my team, it is just like to check email every morning about whether yesterday night backups have run successfully or not?.
if I can re-direct that then pls tell me how to do it?.
I am using NBU 6.5.4 on Redhat 5.5 (2.6kernel)
Thanks
Bharath
Solved! Go to Solution.
11-17-2010 12:20 PM
Sends me a summary by return code.
I can then just look at items other then 0, 1, and 150
And it depends on what you really want.
My report gives me for all attempts. Meaning if the first attempt failed with a 13, and the second attempt was good. That server would show up in both the 0 group and the 13 group.
I like to know how often attempt 1 failes and what it is failing on. Some people only want the final resualt.
I have it in cron an a unix server. (if monday it check back to 5 pm on friday)
after the email it creates a new file with todays date.
rptdate=`cat /opt/openv/scripts/temp/date4dlyrpt`
mydate=`date +%w`
if [ $mydate == 1 ]
then
h=64
else
h=16
fi
/usr/openv/netbackup/bin/admincmd/bperror -U -backstat -hoursago $h -by_statcode
> /opt/openv/scripts/temp/bksum.txt
mail -s "Daily Backup Summary for $rptdate" someonewhocares@mydomain.com < /opt/openv/scripts/temp/bksum.txt
date '+%a %b %d %Y' > /opt/openv/scripts/temp/date4dlyrpt
11-17-2010 11:54 AM
You have a lot of options:
I'd use OpsCenter to achieve that. It's include in the NetBackup Enterprise Licensing, you don't need to pay more for that unless you want to have some advanced reporting features but, in your case, the "free" version you help.
Regards,
Raphael Carvalho
11-17-2010 12:20 PM
Sends me a summary by return code.
I can then just look at items other then 0, 1, and 150
And it depends on what you really want.
My report gives me for all attempts. Meaning if the first attempt failed with a 13, and the second attempt was good. That server would show up in both the 0 group and the 13 group.
I like to know how often attempt 1 failes and what it is failing on. Some people only want the final resualt.
I have it in cron an a unix server. (if monday it check back to 5 pm on friday)
after the email it creates a new file with todays date.
rptdate=`cat /opt/openv/scripts/temp/date4dlyrpt`
mydate=`date +%w`
if [ $mydate == 1 ]
then
h=64
else
h=16
fi
/usr/openv/netbackup/bin/admincmd/bperror -U -backstat -hoursago $h -by_statcode
> /opt/openv/scripts/temp/bksum.txt
mail -s "Daily Backup Summary for $rptdate" someonewhocares@mydomain.com < /opt/openv/scripts/temp/bksum.txt
date '+%a %b %d %Y' > /opt/openv/scripts/temp/date4dlyrpt
11-17-2010 01:15 PM
i like the report of
./bperror -backstat -U -hoursago 24 -by_statcode > /home/user/report
and then i can mail the report file to our team,
Ihave a question that: does this command show all kind of backup results with status codes?.
Bharath
11-17-2010 01:25 PM
bperror -backstat .. is the same as 'Backup Status Report' in the GUI. It gives all status codes - failed and successful.
Please mark J.Hinchcliffe's post as Solution.
11-17-2010 03:49 PM
all status in numerical order.
I always go to the bottom and look at all jobs that had anything other than 0, 150
I am always looking to see if there is anything I can fix to prevent failures and multiply attempts.
11-30-2010 01:55 PM
Thanks for your responses on theses I edited the backup_notify and session_notify script
cat $OUTF | mail -s "successful NetBackup backup" <<< email addresses >>>>
but if I want ot combine the reports and do it as a single email for all the servers, how can I do that?.
11-30-2010 03:33 PM
have your command send the output to a file
> says start a new file ( if the file is already there delete it and start fresh)
>> says append to the file.
so you could
echo "first command" > outfile.txt
command >> outfile.txt
echo "second command" >> outfile.txt
command >> outfile.txt
the email line.