03-30-2017 09:33 PM
Hi ,
i have modified parent_end_notify to send me alert when parent job failed with a Full backup type failed
it works good with all filesystems
but i doesn't send alert for the databases like oracle and sql
does this script only for filesystem , if yes is there any way to monitor databases backup ?
03-30-2017 10:29 PM
Hello
It should work for database policy type as well.
Please share the content of parent_end_notify script
There is one more option suggested in below post.
https://vox.veritas.com/t5/NetBackup/Parent-end-notify-script/td-p/691791
Thanks & Regards
03-30-2017 10:47 PM - edited 03-30-2017 10:49 PM
Hi Tousif ,
Thanks for your reply
This is my modified code
#! /bin/sh # $Header: parent_end_notify.sh,v 1.3 2009/08/10 20:44:49 $ #bcpyrght #*************************************************************************** #* $VRTScprght: Copyright 2014 Symantec Corporation, All Rights Reserved SY39-6648-5573-26-15-5 $ * #*************************************************************************** #ecpyrght # # parent_end_notify.sh # # This script is called by GenBackupJob (nbjm), after the parent job has completed. # # NOTE: this script will always be run in "background" mode, meaning that # GenBackupJob (nbjm) will NOT wait for it's completion. # # This script: # receives 7 parameters: # CLIENT - the client hostname # POLICY - the policy label # SCHEDULE - the schedule label # SCHEDULE_TYPE - the type of schedule: FULL INCR UBAK UARC # STATUS - the backup status for this job # STREAM - the backup stream number for this job always -1 # STREAM_CNT - # streams started (if -1, genjob failed to call pem) # must be executable by the root user # should exit with 0 upon successful completion OUTF=/usr/openv/netbackup/bin/PARENT_END_CALLED # -------------------------------------------------------------------- # main script starts here # -------------------------------------------------------------------- umask 022 dateStr=`date` if [ "$#" -lt 7 ] then echo ${dateStr} "parent_end_notify expects at least 7 parameters: $*" >> $OUTF exit 1 fi # You may want to delete the output file elsewhere in order to # accumulate successful backup information. # If so, comment out the following 4 lines. if [ -s $OUTF ] then /bin/rm -rf $OUTF fi if [ ! -f $OUTF ] then touch $OUTF fi echo ${dateStr} "-----------------------------" >> $OUTF echo ${dateStr} " CLIENT: $1" >> $OUTF echo ${dateStr} " POLICY: $2" >> $OUTF echo ${dateStr} " SCHEDULE: $3" >> $OUTF echo ${dateStr} "SCHEDULE TYPE: $4" >> $OUTF echo ${dateStr} " STATUS: $5" >> $OUTF echo ${dateStr} " STREAM: $6" >> $OUTF echo ${dateStr} " STREAM_CNT: $7" >> $OUTF echo ${dateStr} "-----------------------------" >> $OUTF # # might want to mail this info to someone # # cat $OUTF | mail -s "NetBackup parent end notify" someone_who_cares if [ "$4" == "FULL" ] then if [ "$5" -ne "0" ] then cat $OUTF | mail -s "NetBackup backup exit" admin@server.iti.com fi fi exit 0
03-30-2017 10:50 PM - edited 03-30-2017 10:52 PM
Hi Tousif ,
Thanks for your reply , this is my modified code
#! /bin/sh # $Header: parent_end_notify.sh,v 1.3 2009/08/10 20:44:49 $ #bcpyrght #*************************************************************************** #* $VRTScprght: Copyright 2014 Symantec Corporation, All Rights Reserved SY39-6648-5573-26-15-5 $ * #*************************************************************************** #ecpyrght # # parent_end_notify.sh # # This script is called by GenBackupJob (nbjm), after the parent job has completed. # # NOTE: this script will always be run in "background" mode, meaning that # GenBackupJob (nbjm) will NOT wait for it's completion. # # This script: # receives 7 parameters: # CLIENT - the client hostname # POLICY - the policy label # SCHEDULE - the schedule label # SCHEDULE_TYPE - the type of schedule: FULL INCR UBAK UARC # STATUS - the backup status for this job # STREAM - the backup stream number for this job always -1 # STREAM_CNT - # streams started (if -1, genjob failed to call pem) # must be executable by the root user # should exit with 0 upon successful completion OUTF=/usr/openv/netbackup/bin/PARENT_END_CALLED # -------------------------------------------------------------------- # main script starts here # -------------------------------------------------------------------- umask 022 dateStr=`date` if [ "$#" -lt 7 ] then echo ${dateStr} "parent_end_notify expects at least 7 parameters: $*" >> $OUTF exit 1 fi # You may want to delete the output file elsewhere in order to # accumulate successful backup information. # If so, comment out the following 4 lines. if [ -s $OUTF ] then /bin/rm -rf $OUTF fi if [ ! -f $OUTF ] then touch $OUTF fi echo ${dateStr} "-----------------------------" >> $OUTF echo ${dateStr} " CLIENT: $1" >> $OUTF echo ${dateStr} " POLICY: $2" >> $OUTF echo ${dateStr} " SCHEDULE: $3" >> $OUTF echo ${dateStr} "SCHEDULE TYPE: $4" >> $OUTF echo ${dateStr} " STATUS: $5" >> $OUTF echo ${dateStr} " STREAM: $6" >> $OUTF echo ${dateStr} " STREAM_CNT: $7" >> $OUTF echo ${dateStr} "-----------------------------" >> $OUTF # # might want to mail this info to someone # # cat $OUTF | mail -s "NetBackup parent end notify" someone_who_cares if [ "$4" == "FULL" ] then if [ "$5" -ne "0" ] then cat $OUTF | mail -s "NetBackup backup exit" admin@server.mysite.com fi fi exit 0
03-30-2017 10:54 PM - edited 03-30-2017 10:54 PM
Thanks Tousif for your reply , this is my modified code
#! /bin/sh # $Header: parent_end_notify.sh,v 1.3 2009/08/10 20:44:49 $ #bcpyrght #*************************************************************************** #* $VRTScprght: Copyright 2014 Symantec Corporation, All Rights Reserved SY39-6648-5573-26-15-5 $ * #*************************************************************************** #ecpyrght # # parent_end_notify.sh # # This script is called by GenBackupJob (nbjm), after the parent job has completed. # # NOTE: this script will always be run in "background" mode, meaning that # GenBackupJob (nbjm) will NOT wait for it's completion. # # This script: # receives 7 parameters: # CLIENT - the client hostname # POLICY - the policy label # SCHEDULE - the schedule label # SCHEDULE_TYPE - the type of schedule: FULL INCR UBAK UARC # STATUS - the backup status for this job # STREAM - the backup stream number for this job always -1 # STREAM_CNT - # streams started (if -1, genjob failed to call pem) # must be executable by the root user # should exit with 0 upon successful completion OUTF=/usr/openv/netbackup/bin/PARENT_END_CALLED # -------------------------------------------------------------------- # main script starts here # -------------------------------------------------------------------- umask 022 dateStr=`date` if [ "$#" -lt 7 ] then echo ${dateStr} "parent_end_notify expects at least 7 parameters: $*" >> $OUTF exit 1 fi # You may want to delete the output file elsewhere in order to # accumulate successful backup information. # If so, comment out the following 4 lines. if [ -s $OUTF ] then /bin/rm -rf $OUTF fi if [ ! -f $OUTF ] then touch $OUTF fi echo ${dateStr} "-----------------------------" >> $OUTF echo ${dateStr} " CLIENT: $1" >> $OUTF echo ${dateStr} " POLICY: $2" >> $OUTF echo ${dateStr} " SCHEDULE: $3" >> $OUTF echo ${dateStr} "SCHEDULE TYPE: $4" >> $OUTF echo ${dateStr} " STATUS: $5" >> $OUTF echo ${dateStr} " STREAM: $6" >> $OUTF echo ${dateStr} " STREAM_CNT: $7" >> $OUTF echo ${dateStr} "-----------------------------" >> $OUTF # # might want to mail this info to someone # # cat $OUTF | mail -s "NetBackup parent end notify" someone_who_cares if [ "$4" == "FULL" ] then if [ "$5" -ne "0" ] then cat $OUTF | mail -s "NetBackup backup exit" admin@server.mysite.com fi fi exit 0
03-30-2017 10:57 PM
Thanks for your reply , this is the modified code
#! /bin/sh # $Header: parent_end_notify.sh,v 1.3 2009/08/10 20:44:49 $ #bcpyrght #*************************************************************************** #* $VRTScprght: Copyright 2014 Symantec Corporation, All Rights Reserved SY39-6648-5573-26-15-5 $ * #*************************************************************************** #ecpyrght # # parent_end_notify.sh # # This script is called by GenBackupJob (nbjm), after the parent job has completed. # # NOTE: this script will always be run in "background" mode, meaning that # GenBackupJob (nbjm) will NOT wait for it's completion. # # This script: # receives 7 parameters: # CLIENT - the client hostname # POLICY - the policy label # SCHEDULE - the schedule label # SCHEDULE_TYPE - the type of schedule: FULL INCR UBAK UARC # STATUS - the backup status for this job # STREAM - the backup stream number for this job always -1 # STREAM_CNT - # streams started (if -1, genjob failed to call pem) # must be executable by the root user # should exit with 0 upon successful completion OUTF=/usr/openv/netbackup/bin/PARENT_END_CALLED # -------------------------------------------------------------------- # main script starts here # -------------------------------------------------------------------- umask 022 dateStr=`date` if [ "$#" -lt 7 ] then echo ${dateStr} "parent_end_notify expects at least 7 parameters: $*" >> $OUTF exit 1 fi # You may want to delete the output file elsewhere in order to # accumulate successful backup information. # If so, comment out the following 4 lines. if [ -s $OUTF ] then /bin/rm -rf $OUTF fi if [ ! -f $OUTF ] then touch $OUTF fi echo ${dateStr} "-----------------------------" >> $OUTF echo ${dateStr} " CLIENT: $1" >> $OUTF echo ${dateStr} " POLICY: $2" >> $OUTF echo ${dateStr} " SCHEDULE: $3" >> $OUTF echo ${dateStr} "SCHEDULE TYPE: $4" >> $OUTF echo ${dateStr} " STATUS: $5" >> $OUTF echo ${dateStr} " STREAM: $6" >> $OUTF echo ${dateStr} " STREAM_CNT: $7" >> $OUTF echo ${dateStr} "-----------------------------" >> $OUTF # # might want to mail this info to someone # # cat $OUTF | mail -s "NetBackup parent end notify" someone_who_cares if [ "$4" == "FULL" ] then if [ "$5" -ne "0" ] then cat $OUTF | mail -s "NetBackup backup exit" admin@server.testsite.com fi fi exit 0
03-30-2017 11:24 PM
Hello,
What schedule type are you getting in NBU activity monitor for database Parent Job?
In script it only mentioned "FULL" schedule type".
if [ "$4" == "FULL" ]
Thanks & Regards,
03-31-2017 01:48 AM - edited 03-31-2017 01:51 AM
yes i need to be notified with only failed jobs with type full does the problem may be due to Full , is it different keyword for databases ??
04-01-2017 01:08 AM
04-08-2017 05:20 AM
04-08-2017 09:06 PM