cancel
Showing results for 
Search instead for 
Did you mean: 

have enabled the "Allow multiple data streams" on policies and I want the parent job send email and not jobs son.

fernando_sant2
Level 3

Have enabled the "Allow multiple data streams" on policies and I want the only "father job" send email and not jobs son.

Every "Backup Selections" successfully accomplished I get an email, and I only receive an email from Main Job (father)

For example:

First email "son":

      
From:    root <root@brspomas01.AS.GlobalAD.local>    
     
To:    fernando.santos@ingredion.com    

Backup on client brcoem01 for user root by server brspomas01 succeeded.

Policy = BRCOEM01
Schedule = INCR-BRCOEM01

File list
---------
/DAOS

 

Second email "son":

Backup on client brcoem01 for user root by server brspomas01 succeeded.

Policy = BRCOEM01
Schedule = INCR-BRCOEM01

File list
---------
/opt/ibm

 

And the "Father job"

        
From:    root <root@brspomas01.AS.GlobalAD.local>    
        
To:    fernando.santos@ingredion.com    

 

 

Backup on client brcoem01 for user root by server brspomas01 succeeded.

Policy = BRCOEM01
Schedule = INCR-BRCOEM01

File list
---------
/opt/ibm
/notesdata
/archive
/DAOS

1 ACCEPTED SOLUTION

Accepted Solutions

SJ_Hollist
Level 3

That's the default script that comes with the install.  You'll have to modify it to meet your needs.

The key is to use the "STREAM" veriable to check if it's the parent job, and then format the output the way you want to see it, and e-mail it to the appropriate address.

Be sure to keep a copy, or link to the actual script as when you upgrade or patch it may get overwritten and put back to the default.

If you need assistance with the scripts modification, you can contact me directly: 

http://rotisory.spaldam.com/2013/07/mediapress-information-kit.html

View solution in original post

4 REPLIES 4

SJ_Hollist
Level 3
You'll have to do some scripting on the master in the "/usr/openv/netbackup/bin/backup_exit_notify" script to filter out what you don't want, and only send mail on what you do want. Then remove any e-mails configured within the master server or client properties.

fernando_sant2
Level 3

I Have this on the backup_exit_notify, how i change to only send the "father" job

 

[root@brspomas01 bin]# cat backup_exit_notify
#! /bin/sh
# $Header: backup_exit_notify.sh,v 1.6 2011/10/19 14:07:15 $

#bcpyrght
#***************************************************************************
#* $VRTScprght: Copyright 2013 Symantec 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 8 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
#         DONE_TRYING      - 0=will retry, 1=done, will not retry.
#         PRIMARY_JOBID    - the jobid 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

dateStr=`date`
if [ "$#" -lt 8 ]
then
        echo ${dateStr} "backup_exit_notify expects at least 8 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} "  DONE_TRYING:  $7" >> $OUTF
echo ${dateStr} "PRIMARY JOBID:  $8" >> $OUTF
echo ${dateStr} "-----------------------------" >> $OUTF

#
# might want to mail this info to someone
#
# cat $OUTF | mail -s "NetBackup backup exit" someone_who_cares

exit 0

SJ_Hollist
Level 3

That's the default script that comes with the install.  You'll have to modify it to meet your needs.

The key is to use the "STREAM" veriable to check if it's the parent job, and then format the output the way you want to see it, and e-mail it to the appropriate address.

Be sure to keep a copy, or link to the actual script as when you upgrade or patch it may get overwritten and put back to the default.

If you need assistance with the scripts modification, you can contact me directly: 

http://rotisory.spaldam.com/2013/07/mediapress-information-kit.html

Marianne
Moderator
Moderator
Partner    VIP    Accredited Certified

There is also parent_start_notify and parent_end_notify scripts.

See NBU Admin Guide II for details.