08-24-2011 12:27 AM
Hi,
I'm using Symantec NetBackup 7.0.1 installed on Solaris 10 64 bit Platform.
I would like to generate a report file for backups failed with Error Code:1 for last 24 hours with fields JOBID, CLIENT, POLICY, ERROR CODE, DESCRIPTION (Eg: WRN or ERR or TRV). I would like to run the script every day morining @ 8am. Please suggest how to do it by using bperror command with specific fields.
Solved! Go to Solution.
08-25-2011 05:36 AM
Not pretty but whatever.... you can do whatever you want with it from here..
/usr/openv/netbackup/bin/admincmd/bperror -l -backstat -hoursago 24 | awk '{print $6, $12, $14, $19, system("/usr/openv/netbackup/bin/admincmd/bperror -S "$19)}' | sed -e '/^0$/d' -e '/^No/d'
08-24-2011 05:16 AM
Look at this thread:
http://news.support.veritas.com/connect/pt-br/forums/bperror-column-descriptions
..I would then use awk to grab the fields you wants...
08-24-2011 10:02 PM
Thanks Nathan,
Can you provide script for the format that I need the output.
08-25-2011 05:36 AM
Not pretty but whatever.... you can do whatever you want with it from here..
/usr/openv/netbackup/bin/admincmd/bperror -l -backstat -hoursago 24 | awk '{print $6, $12, $14, $19, system("/usr/openv/netbackup/bin/admincmd/bperror -S "$19)}' | sed -e '/^0$/d' -e '/^No/d'
08-25-2011 07:51 AM
Schedule it to run using cron job, make an entry for the script suggested by Nathan in crontab and you can let it run at your scheuled time.
Another Option is to use and edit the bpend_notify script to send a mail to your mailbox for errors/failures and can also trigger this failure event, to log case in your ticketing tool.
Rajesh, If you like the option suggested then you can mark it as solution and close this thread by voting it.