1. Add following lines to the /usr/openv/netbackup/bin/backup_exit_notify script after the 8 'echo' statements:
[color green]
############begin custom edits#############
if [ "$5" -gt 1 ]
fi
############end custom edits###############
[/color]
NOTE: The backup_exit_notify script is called by the bpsched process on the master upon the exit of any backup job. The first 4 lines exit the script if the job status is anything other than 0 or 1. The next line says if the policy name of the backup is 'laptopTest', then run a duplicate. The bpduplicate command specifies to make a copy of any images written in the last 2 hours for client 'laptop' in policy 'laptopTest' and schedule 'FullNoSched'.
Entire script:
#bcpyrght
#***************************************************************************
#* $VRTScprght: Copyright 1993 - 2003 VERITAS Software Corporation, All Rights Reserved $ *
#***************************************************************************
#ecpyrght
#
# backup_exit_notify.sh
#
# This script is called by the NetBackup scheduler, after an individual
# client backup has completed (including media closure and image db validation.
#
# NOTE: this script will always be run in "background" mode, meaning that
# the NetBackup scheduler will NOT wait for it's completion.
#
# 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
# must be executable by the root user
# should exit with 0 upon successful completion
OUTF=/usr/openv/netbackup/bin/BACKUP_EXIT_CALLED
# --------------------------------------------------------------------
# main script starts here
# --------------------------------------------------------------------
umask 022
if [ "$#" -lt 6 ]
then
echo `date` "backup_exit_notify expects at least 6 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
#
# might want to mail this info to someone
#
# cat $OUTF | mail -s "NetBackup backup exit" someone_who_cares
[color green]
############begin custom edits#############
if [ "$5" -gt 1 ]
then
exit 1
fi
######
if [ "$2" = "laptopTest" ]
then
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.