cancel
Showing results for 
Search instead for 
Did you mean: 

RE: backup notification to the team

bharath_jakkani
Level 4

 

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

1 ACCEPTED SOLUTION

Accepted Solutions

J_H_Is_gone
Level 6

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 

 

View solution in original post

7 REPLIES 7

RAPHAEL_F_CARVA
Level 5
Employee Accredited Certified

You have a lot of options:

  1. Use NetBackup OpsCenter that is a WEB based report application where you can configure, schedule and send reports to your email;
  2. Customize and use the Backup_end_notify script that is automatically called at the end of each backup job (The problem with this option is that you will receive a mail for each backup job);
  3. Customize and use the session_end_notify script that is automatically called at the end of each backup session.

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

J_H_Is_gone
Level 6

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 

 

bharath_jakkani
Level 4

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

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

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.

J_H_Is_gone
Level 6

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.

bharath_jakkani
Level 4

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

J_H_Is_gone
Level 6

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.