Run Script on the Master when Job Starts
- 15 years agouse the parent notify - it ONLY runs on the master server and only with the parent starts or stops
(parent_end_notify parent_start_notify)
you have to put logic into it to test for
# This script:
# receives 5 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
# must be executable by the root user
# should exit with 0 upon successful completion
example
if [ $2 = "Hot_Catalog_Backup" ]
then
OUTF=/usr/openv/netbackup/bin/PARENT_END_CALLED.Hot_Catalog_Backup
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} "-----------------------------" >> $OUTF
<do your thing here>
cat $OUTF | mail -s "Netbackup parent end notify for Catalog" tosomeonewhocares@company.com
fi