cancel
Showing results for 
Search instead for 
Did you mean: 

NBU Email Notifications

jwmcf1
Level 4

I'm needing to test email notifs in NBU 7.  I have followed the several guides on setting up Blat and editing the nbmail.cmd script and what not.  I configured email notifs yesterday and received no notifications overnight from any of the jobs.  I looked over my settings and changed some things and reinstalled blat as an administrator today, but now I'm wanting to test this out without waiting until tonights jobs.

My question is this:

How can I test to see if notifications will be sent without actually running backup jobs?  Is there a way to trigger the email notif process by maybe running a certain script in the chain?  I have tried running nbmail.cmd by itself but this of course results in errors as the variables have no value as the script hasnt been fed from the others that I assume need to run first. Is there a  way to inject test variables into nbmail?

Also, how can I check if the notification scripts are even being run when jobs finish in the first place?  Right now I am just assuming that the notification scripts ran last night on jobs completion, but isnt there a way to verify this?  Looking at the job details I don't see any reference to email being sent.  I followed the guide to setup logging to a bpcd folder but I'm not exactly sure if this is what I need. 

Right now I just want to see it succesfully work by shooting me some emails,  after following Article 64984 I should be set to receive all emails, both successful and failures.

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

RiaanBadenhorst
Level 6
Partner    VIP    Accredited Certified

Hi,

 

First thing to do

% blat -install emailserver.company.com useraccount@company.com

% blat C:\testfile.txt -s test_subject -to useraccount@company.com

Does that work?

 

Then edit the section in your nbmail.cmd and remove all the @REM pieces, and replace WARTOHG with your email server's address.

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

@REM blat %3 -s %2 -t %1 -i NetBackup -server WARTHOG -q

@REM ) ELSE (

@REM blat %3 -s %2 -t %1 -i NetBackup -server WARTHOG -q -attach %4

@REM )

 

To test if it works simply run

nbmail.cmd testing blat functionality (%1=This, %2=blat, %functionaility)

NBU usually passes the variables but you can replace them as stated above to test.

Are you running windows 2008 64bit? I've not seen blat work on 64bit.....

View solution in original post

5 REPLIES 5

RiaanBadenhorst
Level 6
Partner    VIP    Accredited Certified

Hi,

 

First thing to do

% blat -install emailserver.company.com useraccount@company.com

% blat C:\testfile.txt -s test_subject -to useraccount@company.com

Does that work?

 

Then edit the section in your nbmail.cmd and remove all the @REM pieces, and replace WARTOHG with your email server's address.

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

@REM blat %3 -s %2 -t %1 -i NetBackup -server WARTHOG -q

@REM ) ELSE (

@REM blat %3 -s %2 -t %1 -i NetBackup -server WARTHOG -q -attach %4

@REM )

 

To test if it works simply run

nbmail.cmd testing blat functionality (%1=This, %2=blat, %functionaility)

NBU usually passes the variables but you can replace them as stated above to test.

Are you running windows 2008 64bit? I've not seen blat work on 64bit.....

Marianne
Level 6
Partner    VIP    Accredited Certified

Have a look at this post:

 

https://www-secure.symantec.com/connect/forums/blat-and-nbmailcmd-nbu-7-win-2008r2

 

jwmcf1
Level 4

Hi as always thanks for replies.

Ok I just setup a generic small test job and blat is pushing out email notifications as it should.  I am still curious if there is a log where I can look to see that the test job called the notification script and did run it.  I would like to know for possible future troubleshooting purposes.

Also, I am running Windows 2008 R2 and it appears to be working just fine so far.  Maybe I will run into some other issues, but hopefully not.

 

Now in regards to this comment:

To test if it works simply run

nbmail.cmd testing blat functionality (%1=This, %2=blat, %functionaility)

I'm not sure I'm clear on this, are you saying to run that whole string from the command line? Or should I replace the variables in nbmail %1 with this and %2 with blat, %functionality

thanks!

jwmcf1
Level 4

I did follow that post this morning and realized I had not run the blat install as an administrator.  I think that is what my problem was for last nights jobs.

thank you for the link

jwmcf1
Level 4

for reference to anyone else, this is what I have done to get notifs working so far:

1. install Blat as stated in the manual, but be sure to do the install with admin privilages. ie: "Run as Administrator" the command prompt

2. Edited ONLY my nbmail.cmd as follows:

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

blat %3 -s %2 -t %1 -enriched -q
) ELSE (
blat %3 -s %2 -t %1 -enriched -q -attach %4
)
 
I don't know if -enriched is really needed, but the notifications are working so I will leave it and not worry about testing without.
 
Followed this guide to understand and setup the administrator emails:
the chart at the bottom was very usefull in understanding the way this works
 
Now I will start researching how to change the subject line to state the job status.
 
thanks!