cancel
Showing results for 
Search instead for 
Did you mean: 

No Email from NetBackup since 7.5 Upgrade

GlennG-NB
Level 4

I upgraded our Windows NetBackup Enterprise server from 6.5.4 to 7.5 recently.  After the upgrade, we stopped receiving two kinds of email messages from the system:  catalog disaster recovery messages and backup failure notices.  Before the upgrade they both worked fine.

 

I should explain that we have the mailer scripts configured to send only backup failure messages and not to send backup success messages.  To do this, we have commented out all the lines in nbmail.cmd and added specific entries to backup_exit_notify.cmd.  I'll copy the relevant lines below.  We do get the "BadParams" message in the log, so I suspect that 7.5 is not putting out the correct number of parameters for the scripts to work.

 

We use blat 2.62 and it works fine.  If I configure nbmail.cmd to send mail, we do receive the normal success and failure messages.  But we don't want our mailboxes overflowing with success messages.

 

I've had a case open with tech support for more than a month, and the engineer seems bewildered and incompetent.  Any help would be appreciated.  Thanks.   -Glenn.

 

From backup_exit_notify.cmd:

@if "%6" == "" goto BadParams
@if "%7" == "" goto GoodParams
:BadParams
@echo %DATE% backup_exit_notify expects 6 parameters: %* >> %OUTF%
@goto EndMain
:GoodParams
@REM ---------------------------------------------------------------------------
@REM - You may want to delete the output file elsewhere in order to
@REM - accumulate successful backup information.  If so, delete the
@REM - following line or move it to where it will do the most good.
@REM ---------------------------------------------------------------------------
@if exist %OUTF% del %OUTF%
@REM ---------------------------------------------------------------------------
@echo %DATE% ----------------------------- >> %OUTF%
@echo %DATE%        CLIENT:  %1 >> %OUTF%
@echo %DATE%        POLICY:  %2 >> %OUTF%
@echo %DATE%      SCHEDULE:  %3 >> %OUTF%
@echo %DATE% SCHEDULE TYPE:  %4 >> %OUTF%
@echo %DATE%        STATUS:  %5 >> %OUTF%
@echo %DATE%        STREAM:  %6 >> %OUTF%
@echo %DATE% ----------------------------- >> %OUTF%
@REM ---------------------------------------------------------------------------
@REM - might want to mail this info to someone
@REM - Next two lines added by Glenn to filter out success messages. We are not
@REM - using the nbmail.cmd script because this replaces it.
@REM ---------------------------------------------------------------------------
@IF /I %5 LEQ 1 GOTO :EndMain
@blat %OUTF% -s "Backup Failed on %1 status %5" -t admins@example.com -i NetBackup -server svr-exchange03 -q
@REM ---------------------------------------------------------------------------
@REM - @call %NB_MAIL_SCRIPT% someone_who_cares "NetBackup backup exit" %OUTF%
@REM ---------------------------------------------------------------------------
:EndMain
@endlocal

1 ACCEPTED SOLUTION

Accepted Solutions

CRZ
Level 6
Employee Accredited Certified

I never got it marked as a solution back then (which made it IMPOSSIBLE for me to find today!) but I believe you have already nailed it - you need to change your conditionals to expect a different number of fields:

https://www-secure.symantec.com/connect/forums/bpsched-seems-doesnt-call-backupexitnotify-script

Check a stock 7.5 "backup_exit_notify" - it will probably help you nail down how to handle the eight (!) parameters sent.

View solution in original post

9 REPLIES 9

CRZ
Level 6
Employee Accredited Certified

I never got it marked as a solution back then (which made it IMPOSSIBLE for me to find today!) but I believe you have already nailed it - you need to change your conditionals to expect a different number of fields:

https://www-secure.symantec.com/connect/forums/bpsched-seems-doesnt-call-backupexitnotify-script

Check a stock 7.5 "backup_exit_notify" - it will probably help you nail down how to handle the eight (!) parameters sent.

GlennG-NB
Level 4

Thanks for the info, Chris.  I found a later version of backup_exit_notify.cmd with eight parameters and modified it to suit our environment.

So that works fine, but I still haven't figured out how to get the catalog disaster recovery messages going again.  The script that makes this work is called mail_dr_info.cmd.  It is simply a copy of nbmail.cmd with a different file name.  There does not seem to be a later version than 1.8.  If I rename it nbmail.cmd, it sends backup status notifications, but it does not send catalog DR messages when I rename it mail_dr_info.cmd.  I have the correct e-mail address entered in the DR page in the catalog backup policy.  What am I missing?

Thanks.   -Glenn. 

CRZ
Level 6
Employee Accredited Certified

It's been a busy week.  :)  If you're still having problems, I would ask you to triple-check the email address specified in the Disaster Recovery tab - it's the only configuration I can think of off the top of my head that would be the difference between your script working as nbmail.cmd and not working as mail_dr_info.cmd

Gdd
Level 6
Partner Accredited

I have exactly the same problem, the script seems not to be called:

11:16:35.654 [8160.7380] <16> send_DR_report: failed to execute "E:\NetBackup\NetBackup\bin\mail_dr_info.cmd" "informatique@xxx.fr" "NetBackup Catalog Backup successful on host srvbackup status 0" "E:\NetBackup\NetBackup\db\mail\srvbackup_1337937367" "E:\Exploitation\DR_File\E_Catalog_1337937367_FULL" (1)
11:16:35.654 [8160.7380] <16> generate_DR_file_and_send_mail: Could not send DR report
11:16:35.654 [8160.7380] <16> exec_catalog_DR_protection: Failed to send DR image to informatique@xxx.fr (0)

Is there some known restrictions for this script with NetBackup 7.5 ?

GlennG-NB
Level 4

My support case is still open on this problem.  We have checked, double-checked and checked again that the e-mail address is correct.  Here's what bpdbm says:

16:54:04.002 [4148.1336] <16> send_DR_report: failed to execute "C:\Program Files\Veritas\NetBackup\bin\mail_dr_info.cmd" "admin@mycompany.com" "NetBackup Catalog Backup successful on host svr-netbackup status 0" "C:\Program Files\Veritas\NetBackup\db\mail\svr-netbackup_1339623878" "d:\catalog\Catalog_1339623878_FULL" (1)

Any new ideas welcome.  Thanks.   -G.

Mark_Solutions
Level 6
Partner Accredited Certified

I cannot see anything different between the V7 and V7.5 nbmail.cmd so it strikes me that there is something worng with the variables being passed to blat.

Looking at both of your outputs they are like this at the end:

"C:\Program Files\Veritas\NetBackup\db\mail\svr-netbackup_1339623878" "d:\catalog\Catalog_1339623878_FULL"

This is the %4 variable which should be just ""d:\catalog\Catalog_1339623878_FULL" as it asks blat to attach the DR file.

So it fails as one of the 2 files requested cannot be found.

Looks like a bug but perhaps try changing your catalog DR file paths to C:\Program Files\Veritas\NetBackup\db\mail\  and E:\NetBackup\NetBackup\db\mail\ (as you each have different paths) - if what i suspect is right you will get the attachment twice on your e-mail but at least you may get it

Give it a whirl and let me know the result

Hope this helps

GlennG-NB
Level 4

I tried Mark_Solutions' suggestion and then ran a catalog backup.  The catalog DR file was added to the \db\mail folder, but no message was sent.  I watched the \db\mail folder for the duration of the catalog backup job, and the message file never appeared in the \db\mail folder.  So the script must stop because it can't find the message file.  Wonder what happened to it?  Thanks.   -G.

[Clarification for anyone reading.]  The mail_dr_info.cmd script calls for four parameters:

@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  

In my example, the bpdbm log entry breaks down so:

command -- "C:\Program Files\Veritas\NetBackup\bin\mail_dr_info.cmd"

parameter 1 -- "admin@mycompany.com"

parameter 2 -- "NetBackup Catalog Backup successful on host svr-netbackup status 0"

parameter 3 -- "C:\Program Files\Veritas\NetBackup\db\mail\svr-netbackup_1339623878"

parameter 4 -- "d:\catalog\Catalog_1339623878_FULL"

Mark_Solutions
Level 6
Partner Accredited Certified

A little digging which may or may not help!

nbmail.cmd and mail_dr_info.cmd apparently reply on other files to create that message file.

So more digging uncovers the dbbackup_notify.cmd which runs after the catalog backup finishes - so make sure that is in the netbackup\bin directory following your upgrade

This does a few things, one of which is call (from the goodies directory):

listpaths.exe -s NB_MAIL_SCRIPT

Now on my test machine that just outputs nbmail.cmd but i do not have a 7.5 machine available at the moment.

This tends to indicate that you at least need the dbbackup_notify.cmd but also need nbmail.cmd as somewhere along the line it used it to generate the mail message

Take a look at the above files and command and see what 7.5 has and outputs - must be something amiss in this lot somewhere

Hope this helps

GlennG-NB
Level 4

Support finally nailed this one to a missing at sign in the mail_dr_info.cmd script.  There should be an at sign (@) before the IF statement, and it was missing from my script.  Not sure when it got removed, but it is in the original script from Symantec.  Thanks for all the help.   -G.