cancel
Showing results for 
Search instead for 
Did you mean: 

Parent end notify script

nagavp
Level 4
Certified

Hi,

Setup:

NBU: 7.6.0.3

OS: Windows 2008

We are running different set of policies with multistreaming and some without.I would like to configure alert only for parent job failed notification. 

I am getting alerts for all streams which is not required... can  someone plz help...

1 ACCEPTED SOLUTION

Accepted Solutions

Genericus
Moderator
Moderator
   VIP   

I consistantly named the parent job schedule "Parent.Job" and my child schedules "Child.Job"

I added logic to my "backup_exit_notify" scipt in the bin directory - under these lines:

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

I do NOT want an email if the error code is 0, 1, 71, 150, 800 or 191; and I do not want an email for a Child.Job, based on the backup type, I email the appropriate group

if [ $5 != 0 -a $5 != 1 -a $5 != 71 -a $5 != 150 -a $5 != 800 -a $5 != 191 -a $3 != "Child.Job" ]
then
        if /usr/openv/netbackup/bin/admincmd/bppllist $2 -U | grep "Policy Type" | grep MS-Window
        then
                cat $OUTF | /usr/bin/mailx -s "WINDOWS NetBackup Error Status $5, Policy $2, Client $1" \
                operations windows
        elif /usr/openv/netbackup/bin/admincmd/bppllist $2 -U | grep "Policy Type" | grep MS-Exchange
        then
                cat $OUTF | /usr/bin/mailx -s "EXCHANGE NetBackup Error Status $5, Policy $2, Client $1" \
                operations windows
        elif /usr/openv/netbackup/bin/admincmd/bppllist $2 -U | grep "Policy Type" | grep VMWARE
        then
                cat $OUTF | /usr/bin/mailx -s "VMWARE NetBackup Error Status $5, Policy $2, Client $1" \
                operations windows

        elif /usr/openv/netbackup/bin/admincmd/bppllist $2 -U | grep "Policy Type" | grep MS-SQL
        then
                cat $OUTF | /usr/bin/mailx -s "MS-SQL NetBackup Error Status $5, Policy $2, Client $1" \
                operations windows dba
        elif /usr/openv/netbackup/bin/admincmd/bppllist $2 -U | grep "Policy Type" | grep Oracle
        then
                cat $OUTF | /usr/bin/mailx -s "ORACLE NetBackup Error Status $5, Policy $2, Client $1" \
                operations dba unix
        elif /usr/openv/netbackup/bin/admincmd/bppllist $2 -U | grep "Policy Type" | grep Sybase
        then
                cat $OUTF | /usr/bin/mailx -s "SYBASE NetBackup Error Status $5, Policy $2, Client $1" \
                operations dba unix
        else
                cat $OUTF | /usr/bin/mailx -s "UNIX NetBackup Error Status $5, Policy $2, Client $1" \
                operations unix

        fi
fi
 

NetBackup 9.1.0.1 on Solaris 11, writing to Data Domain 9800 7.7.4.0
duplicating via SLP to LTO5 & LTO8 in SL8500 via ACSLS

View solution in original post

11 REPLIES 11

Marianne
Level 6
Partner    VIP    Accredited Certified

Then you need to configure parent_end_notify script on the master.

See http://www.symantec.com/docs/HOWTO106055 

 

nagavp
Level 4
Certified

Thanks for your reply... the script is in bin folder... parent_end_called folder is getting updated everytime the backup completes. But i am not getting an email with the information...

Note: I am getting email from backup_exit_notify script if i enable it...

 

Marianne
Level 6
Partner    VIP    Accredited Certified

Have you had a look at the contents of the script?

Can you see in bin directory if $OUTF is created?

OUTF=/usr/openv/netbackup/bin/PARENT_END_CALLED 

The email section of the script is commented out - you need to customize it:

#
# might want to mail this info to someone
#
# cat $OUTF | mail -s "NetBackup parent end notify" someone_who_cares

 

nagavp
Level 4
Certified

As i mentioned earlier, Yes OUTF is getting created...

i tried the following.. i replaced the following line 

@call %NB_MAIL_SCRIPT% someone_who_cares "NetBackup backup exit" %OUTF%

to 

SendEmail
blat %OUTF% -s %1:%7 -t xxxx@company.com -i NetBackup
-server mail.relay.com -q

But it didnt worked.. 

I tried 

call %NB_MAIL_SCRIPT% xxxx.@company.com "NetBackup backup exit" %OUTF% 

No luck

nagavp
Level 4
Certified

Yes, output file is getting created...

How can i use the following in windows... Can u share the syntax plz..

cat $OUTF | mail -s "NetBackup parent end notify" someone_who_cares

Marianne
Level 6
Partner    VIP    Accredited Certified

I unfortunately do not have access to a Windows master.

Hopefully someone with a Windows master can help here....

Mark_Solutions
Level 6
Partner Accredited Certified

If you run listpaths.exe from the goodies directory does it show the correct value for NB_MAIL_SCRIPT?

You could just try :

@call nbmail.cmd aaa@company.com "NetBackup parent end notify" %OUTF%

Of course make sure that you nbmail script is all OK

nagavp
Level 4
Certified

Hi Mark,

Thanks for your reply... but no luck...:( 

NB_MAIL_Script shows correct value...

I used below one for backup_EXIT_notify which works fine..

:SendEmail
blat %OUTF% -s %1:%5 -t  aaa@company.com -i NetBackup 
-server mail.relay.com -q

nagavp
Level 4
Certified

No luck mark.. :(

Yes, nb_mail_script shows correct value...

i used the following for backup_exit_notify which works fine...

 :SendEmail
blat %OUTF% -s %1:%5 -t mailID -i NetBackup
-server mail.relay.com -q

Mark_Solutions
Level 6
Partner Accredited Certified

I assume if you have many jobs which have parent jobs you are pinning this down based on policy name (parent_end_notify.policyname.bat) otherwise it may never finish as such?

Have you tried it explicitly.

blat PARENT_END_CALLED.policyname -s %1:%5 -t mailID -i NetBackup -server mail.relay.com -q

Genericus
Moderator
Moderator
   VIP   

I consistantly named the parent job schedule "Parent.Job" and my child schedules "Child.Job"

I added logic to my "backup_exit_notify" scipt in the bin directory - under these lines:

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

I do NOT want an email if the error code is 0, 1, 71, 150, 800 or 191; and I do not want an email for a Child.Job, based on the backup type, I email the appropriate group

if [ $5 != 0 -a $5 != 1 -a $5 != 71 -a $5 != 150 -a $5 != 800 -a $5 != 191 -a $3 != "Child.Job" ]
then
        if /usr/openv/netbackup/bin/admincmd/bppllist $2 -U | grep "Policy Type" | grep MS-Window
        then
                cat $OUTF | /usr/bin/mailx -s "WINDOWS NetBackup Error Status $5, Policy $2, Client $1" \
                operations windows
        elif /usr/openv/netbackup/bin/admincmd/bppllist $2 -U | grep "Policy Type" | grep MS-Exchange
        then
                cat $OUTF | /usr/bin/mailx -s "EXCHANGE NetBackup Error Status $5, Policy $2, Client $1" \
                operations windows
        elif /usr/openv/netbackup/bin/admincmd/bppllist $2 -U | grep "Policy Type" | grep VMWARE
        then
                cat $OUTF | /usr/bin/mailx -s "VMWARE NetBackup Error Status $5, Policy $2, Client $1" \
                operations windows

        elif /usr/openv/netbackup/bin/admincmd/bppllist $2 -U | grep "Policy Type" | grep MS-SQL
        then
                cat $OUTF | /usr/bin/mailx -s "MS-SQL NetBackup Error Status $5, Policy $2, Client $1" \
                operations windows dba
        elif /usr/openv/netbackup/bin/admincmd/bppllist $2 -U | grep "Policy Type" | grep Oracle
        then
                cat $OUTF | /usr/bin/mailx -s "ORACLE NetBackup Error Status $5, Policy $2, Client $1" \
                operations dba unix
        elif /usr/openv/netbackup/bin/admincmd/bppllist $2 -U | grep "Policy Type" | grep Sybase
        then
                cat $OUTF | /usr/bin/mailx -s "SYBASE NetBackup Error Status $5, Policy $2, Client $1" \
                operations dba unix
        else
                cat $OUTF | /usr/bin/mailx -s "UNIX NetBackup Error Status $5, Policy $2, Client $1" \
                operations unix

        fi
fi
 

NetBackup 9.1.0.1 on Solaris 11, writing to Data Domain 9800 7.7.4.0
duplicating via SLP to LTO5 & LTO8 in SL8500 via ACSLS