cancel
Showing results for 
Search instead for 
Did you mean: 

How to change email subject ?

Rafiq
Level 3
Hi,

I am getting email when any job failing.
Can i customize email subject. like i want to add policy name
Reason is by seeing subject i can able to understand which job failed, even i no need to open my full mail.

Can anybody suggest me

Thanks
Rafiq
1 ACCEPTED SOLUTION

Accepted Solutions

quebek
Moderator
Moderator
   VIP    Certified
You can You the above script to have customized mail.
This script is expecting 5 parameters:
"#!/usr/bin/sh
# $Header: backup_exit_notify.sh,v 1.3 2003/08/13 14:05:11 $

#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"

So You can try to do a if statement, ie.
if [ "$5" -gt 1 ]
then ....
....
fi
The above was for UNIX env, for windows this can be done too,but I am not an WINDOWS scripting expert :D.

View solution in original post

2 REPLIES 2

quebek
Moderator
Moderator
   VIP    Certified
You can You the above script to have customized mail.
This script is expecting 5 parameters:
"#!/usr/bin/sh
# $Header: backup_exit_notify.sh,v 1.3 2003/08/13 14:05:11 $

#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"

So You can try to do a if statement, ie.
if [ "$5" -gt 1 ]
then ....
....
fi
The above was for UNIX env, for windows this can be done too,but I am not an WINDOWS scripting expert :D.

J_H_Is_gone
Level 6
then when you get to the part where the emails is sent you might be able to put $5 in the subject line or evern $1 for client name.