Video Screencast Help

Edit Mail Subject For Notification Mail At NetBackup 7.0.1

Created: 20 Feb 2013 • Updated: 13 Mar 2013 | 9 comments
This issue has been solved. See solution.

HI ,

I have Symantec Netbackup 7.0.1

and i Configured Master server To send Notification Mail For Success and Failed Jobs ,

Mail subject send Like that ,

 

Backup On Clientserver -0

Backup On Clientserver -13

 

i need to Configure the Subject to be

 

Backup On Clientserver Success  -0

Backup On Clientserver Failed -13

 

how can I do that ??

 

thanks

Comments 9 CommentsJump to latest comment

Nagalla's picture

hi,

Please post your Notify script,  we will see if could able to suggest where you need to customise that.

eng.elfateh@gmail.com's picture

@REM $Header: nbmail.cmd,v 1.8 2005/05/10 16:12:29 $

@REM

@REM bcpyrght

@REM ***************************************************************************

@REM * $VRTScprght: Copyright 1993 - 2009 Symantec Corporation, All Rights Reserved $ *

@REM ***************************************************************************

@REM ecpyrght

@REM

@REM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

@REM -                                                                         -

@REM - HOW TO SEND MAIL FROM THE NT NETBACKUP SERVER                           -

@REM -                                                                         -

@REM - NetBackup checks if the mail script (NetBackup\Bin\nbmail.cmd) exists.  -

@REM - If the script exists, NetBackup runs it passing four parameters on the  -

@REM - command line:                                                       -

@REM -                                                                         -

@REM -      %1 is the recipient's address                                      -

@REM -      %2 is the subject line                                             -

@REM -      %3 is the message file name                                        -
@REM -      %4 is the attached file name                                       -

@REM -                                                                         -

@REM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@REM -                                                                         -

@REM - HOW TO SEND DR MAIL FROM THE NT NETBACKUP SERVER                        -

@REM -                                                                         -

@REM - NetBackup DR protection checks if the mail script                       -
@REM - (NetBackup\Bin\mail_dr_info.cmd) exists.  If the script exists          -

@REM - NetBackup DR protection runs it passing four parameters on the          -

@REM - command line:                                                           -

@REM -                                                                         -

@REM -      %1 is the recipient's address                                      -

@REM -      %2 is the subject line                                             -

@REM -      %3 is the message file name                                        -
@REM -      %4 is the attached file name                                       -

@REM -                                                                         -

@REM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

@REM -                                                                         -

@REM - A public domain SMTP mail client for NT called BLAT is available at:    -

@REM -                                                                         -

@REM -                       http://blat.net/                 ... -

@REM -                                                                         -

@REM - Here's how to use BLAT with the NetBackup NT server.                    -

@REM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

@REM
@IF "%~4"=="" (

blat %3 -s %2 -to %1 -server xxxxxxx.com -q
) ELSE (
blat %3 -s %2 -to %1 -server xxxxxxx.com -q -attach %4
)
@REM

@REM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

@REM - The -i option designates the originator's address, you may change this  -

@REM - or omit it altogether (the default is the sender's address specified    -

@REM - when BLAT was installed).                                               -

@REM -                                                                         -

@REM - The -server option is given as an example, you need to determine the    -

@REM - correct name of your SMTP server.  This option may also be omitted      -

@REM - (the default is the server specified when installing BLAT).             -

@REM -                                                                         -

@REM - You may use any mail program you want, as long as it has a command line -

@REM - interface that can be used to send mail.  Just substitute a call to     -

@REM - your favorite mail program for the call to BLAT above.                  -

@REM -                                                                         -

@REM - After modifying this script to suit your situation (make sure you are   -

@REM - calling a valid mail program and the call is not commented out),        -

@REM - activate it by moving it to the NetBackup\Bin directory.                -

@REM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

@REM - Some email servers do not handle the formating of the messages created  -

@REM - by NetBackup.  Here is an example of how to get Exchange or IIS to      -

@REM - send the mail messages.                               -

@REM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@REM - @copy /y %3 %TEMP%\nbmail.tmp > NUL
@REM - @echo . >> %TEMP%\nbmail.tmp
@IF "%~4"=="" (
blat %TEMP%\nbmail.tmp -s %2 -t %1 -s xxxxxx.com -q
) ELSE (
blat %TEMP%\nbmail.tmp -s %2 -t %1 -s xxxxxxxx.com -q -attach %4
)
@REM -

@REM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Symboy's picture

Hi 

 

  I would persomally recommend to use Opscenter here . You can get lot of other reporting , monitoring, managing options with that FREE ( Unless you want to use Opscenter Anaytics which is a license option ) .

Note: If this post provides you with a solution don't forget to mark the discussion as solved.

eng.elfateh@gmail.com's picture

Hi,

Please Feed me with More Back with Opscenter as Free Solution .

 

Yasuhisa Ishikawa's picture

On UNIX? Or on Windows?

No way on UNIX. But on Windows,you can do it by modifying subject string in nbmail.cmd.

Authorized Symantec Consultant(ASC) Data Protection in Tokyo, Japan

eng.elfateh@gmail.com's picture

dear Yasuhisa ,

i'v MS windows server 2008 R2 64bit.

my Nbmail.com Configured as Following ....... so please advise me

 

@REM $Header: nbmail.cmd,v 1.8 2005/05/10 16:12:29 $

@REM

@REM bcpyrght

@REM ***************************************************************************

@REM * $VRTScprght: Copyright 1993 - 2009 Symantec Corporation, All Rights Reserved $ *

@REM ***************************************************************************

@REM ecpyrght

@REM

@REM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

@REM -                                                                         -

@REM - HOW TO SEND MAIL FROM THE NT NETBACKUP SERVER                           -

@REM -                                                                         -

@REM - NetBackup checks if the mail script (NetBackup\Bin\nbmail.cmd) exists.  -

@REM - If the script exists, NetBackup runs it passing four parameters on the  -

@REM - command line:                                                       -

@REM -                                                                         -

@REM -      %1 is the recipient's address                                      -

@REM -      %2 is the subject line                                             -

@REM -      %3 is the message file name                                        -
@REM -      %4 is the attached file name                                       -

@REM -                                                                         -

@REM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@REM -                                                                         -

@REM - HOW TO SEND DR MAIL FROM THE NT NETBACKUP SERVER                        -

@REM -                                                                         -

@REM - NetBackup DR protection checks if the mail script                       -
@REM - (NetBackup\Bin\mail_dr_info.cmd) exists.  If the script exists          -

@REM - NetBackup DR protection runs it passing four parameters on the          -

@REM - command line:                                                           -

@REM -                                                                         -

@REM -      %1 is the recipient's address                                      -

@REM -      %2 is the subject line                                             -

@REM -      %3 is the message file name                                        -
@REM -      %4 is the attached file name                                       -

@REM -                                                                         -

@REM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

@REM -                                                                         -

@REM - A public domain SMTP mail client for NT called BLAT is available at:    -

@REM -                                                                         -

@REM -                       http://blat.net/                 ... -

@REM -                                                                         -

@REM - Here's how to use BLAT with the NetBackup NT server.                    -

@REM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

@REM
@IF "%~4"=="" (

blat %3 -s %2 -to %1 -xxxxxxxxt.com -q
) ELSE (
blat %3 -s %2 -to %1 -xxxxxxxxx.com -q -attach %4
)
@REM

@REM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

@REM - The -i option designates the originator's address, you may change this  -

@REM - or omit it altogether (the default is the sender's address specified    -

@REM - when BLAT was installed).                                               -

@REM -                                                                         -

@REM - The -server option is given as an example, you need to determine the    -

@REM - correct name of your SMTP server.  This option may also be omitted      -

@REM - (the default is the server specified when installing BLAT).             -

@REM -                                                                         -

@REM - You may use any mail program you want, as long as it has a command line -

@REM - interface that can be used to send mail.  Just substitute a call to     -

@REM - your favorite mail program for the call to BLAT above.                  -

@REM -                                                                         -

@REM - After modifying this script to suit your situation (make sure you are   -

@REM - calling a valid mail program and the call is not commented out),        -

@REM - activate it by moving it to the NetBackup\Bin directory.                -

@REM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

@REM - Some email servers do not handle the formating of the messages created  -

@REM - by NetBackup.  Here is an example of how to get Exchange or IIS to      -

@REM - send the mail messages.                               -

@REM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@REM - @copy /y %3 %TEMP%\nbmail.tmp > NUL
@REM - @echo . >> %TEMP%\nbmail.tmp
@IF "%~4"=="" (
blat %TEMP%\nbmail.tmp -s %2 -t %1 -s xxxxxxx.com -q
) ELSE (
blat %TEMP%\nbmail.tmp -s %2 -t %1 -s xxxxxxx.com -q -attach %4
)
@REM -

@REM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Yasuhisa Ishikawa's picture

Does this work?

Before:

@IF "%~4"=="" (
blat %3 -s %2 -to %1 -xxxxxxxxt.com -q
) ELSE (
blat %3 -s %2 -to %1 -xxxxxxxxx.com -q -attach %4
)

After:


@FOR /F "tokens=1,2,3,4,5" %%i IN ("%2") DO SET SUBJECT=%%i failed %%j %%k %%l %%m
@IF "%m"=="0" (
SET SUBJECT=%%i %%j %%k Success %l %m
) ELSE IF "%m"=="1" (
SET SUBJECT=%%i %%j %%k Partial %l %m
) ELSE (
SET SUBJECT=%%i %%j %%k Failed %l %m
)

@IF "%~4"=="" (
blat %3 -s %SUBJECT% -to %1 -xxxxxxxxt.com -q

) ELSE (

blat %3 -s %SUBJECT%  -to %1 -xxxxxxxxx.com -q -attach %4

)

BTW, following part in your nbmail.cmd seems meaningless because lines for generating nbmail.tmp has commend out. blat may end with error here.

@REM - @copy /y %3 %TEMP%\nbmail.tmp > NUL
@REM - @echo . >> %TEMP%\nbmail.tmp
@IF "%~4"=="" (
blat %TEMP%\nbmail.tmp -s %2 -t %1 -s xxxxxxx.com -q
) ELSE (
blat %TEMP%\nbmail.tmp -s %2 -t %1 -s xxxxxxx.com -q -attach %4
)

Authorized Symantec Consultant(ASC) Data Protection in Tokyo, Japan

SOLUTION
eng.elfateh@gmail.com's picture

dear Yasuhisa ,

thanks alot for your Help

I will try that and renotify you with Result .

i Found 2 Nbmail at My Master Server

First One in bin>>goodies>>nbmail

second in bin>>nbmail

the First One Configured as i had Posted Before

the Second File have only one Line

blat %3 -s %2 -t %1 -i NetBackup -server mail.phdint.com -q
 

which one is the mail depend on ..

BR

 
 

 

Yasuhisa Ishikawa's picture

nbmail.cmd placed under goodies is sample. Actually, NetBackup uses nbmail.cmd under bin folder(install_path¥NetBackup¥bin¥nbmail.cmd).

So, replace second one with following lines.

@FOR /F "tokens=1,2,3,4,5" %%i IN ("%2") DO SET SUBJECT=%%i failed %%j %%k %%l %%m
@IF "%m"=="0" (
SET SUBJECT=%%i %%j %%k Success %l %m
) ELSE IF "%m"=="1" (
SET SUBJECT=%%i %%j %%k Partial %l %m
) ELSE (
SET SUBJECT=%%i %%j %%k Failed %l %m
)

@IF "%~4"=="" (
blat %3 -s %SUBJECT% -t %1 -i NetBackup -server mail.phdint.com -q

) ELSE (
blat %3 -s %SUBJECT% -t %1 -i NetBackup -server mail.phdint.com -q -attach %4

)

Authorized Symantec Consultant(ASC) Data Protection in Tokyo, Japan