How to configure email notifications for Hot (online) Catalog Backup

Article: 100003493
Last Published: 2010-10-28
Ratings: 2 3
Product(s): NetBackup & Alta Data Protection

Problem

How to configure email notifications only for Catalog Backup, for all NetBackup operation email notification, please visit KB article 100016001 below.

Solution

I. Installing and Configuring the BLAT executable (not applicable for Unix master server)
 
1. Download the .ZIP file from  https://www.blat.net/

Note: Blat is a third party product. It is not written, endorsed or supported by Veritas  Any problems with blat should be reported to the makers of blat directly. Veritas will be unable to assist with issues that are encountered when installing or using blat.
 
2. Extract the files to their own folder.
 
Note: Most of the files in this .ZIP file are informational and is source code for developmental purposes.
 
3. Copy the blat.exe file to the \WINNT\System32 directory in Windows
 
4. From a command prompt, run the following command ( Note: This will be the primary account that will send the emails from the specified server):
 
% blat -install <server addr> <sender's addr>
 
Note: "<server addr>" is the hostname or IP address of the email server that will send the email notifications.
 
"<sender's addr>" is the account that will be the primary sender of the email notifications.
 
Example:
 
% blat -install emailserver.company.com useraccount@company.com
 
5. Test the installation of blat by creating a text file C:\testfile.txt with a message and emailing it to the NetBackup administrator.
 
% blat C:\testfile.txt -s test_subject -to useraccount@company.com
 
If blat is working correctly, the NetBackup administrator should receive the contents of the C:\testfile.txt file.
 
Note: Blat stores its configuration information in the Windows registry.  If you need to confirm any default Blat settings, they can be found under the following registry path:   HKEY_LOCAL_MACHINE/SOFTWARE/Public Domain/Blat
 
Warning: Incorrect use of the Windows registry editor may prevent the operating system from functioning properly. Great care should be taken when making changes to a Windows registry. Registry modifications should only be carried-out by persons experienced in the use of the registry editor application. It is recommended that a complete backup of the registry and workstation be made prior to making any registry changes.

II. Configuring the " mail_dr_info" script:
 
NetBackup performs the notification by passing the email addresses, subject, and message to nbmail.cmd or mail_dr_info.cmd. The scripts use the mail program that is specified in the script to send email to the user. See the comments in the script for configuration instructions.
The following points describe how mail_dr_info.cmd and nbmail.cmd interact:
- If mail_dr_info.cmd is configured, the disaster recovery report is sent to the administrator(s) that are indicated in the Disaster
Recovery tab. NetBackup administrators can set up the script to send the disaster recovery information to alternate locations.
- If mail_dr_info.cmd is not configured, and nbmail.cmd is configured, the disaster recovery report is sent to the administrator(s) that are indicated in the Disaster
Recovery tab by nbmail.cmd.
- If neither file is configured, NetBackup attempts to use Microsoft internal IMAPI services.
 
Note: By default, neither nbmail.cmd nor mail_dr_info.cmd is configured to send email.
 
To use mail_dr_info.cmd to send NetBackup disaster recovery information you will need to copy the following script from the master server:

For Window: install_path\VERITAS\NetBackup\bin\nbmail.cmd
For Unix: /usr/openv/netbackup/bin/nbmail.sh

Place it into the following location:

For Window: install_path\NetBackup\bin\mail_dr_info.cmd
For Unix: /usr/openv/netbackup/bin/mail_dr_info.sh

NetBackup passes the following parameters to the script:

%1 The recipient's address. For multiple addresses, enter email1,email2
%2 The subject line.
%3 The message file name.
%4 The attached file name.

After a successful catalog backup, NetBackup checks to see if mail_dr_info.cmd is present. If exists, NetBackup passes the parameters to the script.
 
Most of the lines in the script file are informational. The following line(s) are what need to be adjusted:

Find the section:
@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 )
 
Remove " @REM" from the beginning of each line. This will activate the sections needed for blat to run.
Replace "WARTHOG" with the name of the email server. An example of how this line should now appear is (please note the change of parameters for newer versions of BLAT):

For example:
@IF "%~4"=="" (
blat %3 -s %2 -t %1 -i NetBackup -server emailserver.company.com -q
) ELSE (
blat %3 -s %2 -t %1 -i NetBackup -server emailserver.company.com -q -attach %4
)
 
Example for blat version 2.6+:
@IF "%~4"=="" (
blat %3 -s %2 -to %1 -server emailserver.company.com -q
) ELSE (
blat %3 -s %2 -to %1 -server emailserver.company.com -q -attach %4
)
 
Options explained:
  • %3 is the file that BLAT will send in the body of the email. This is generated by one of the other scripts, backup_notification.cmd for example.
  • -s is the subject line of the email ("-s" is replaced by "-subject" in blat 2.6+)
  • %2 is the contents of the subject line. This is generated by another script that calls on blat, backup_notification.cmd, for example.
  • -t is who will receive the email. ("-t" is replaced by "-to" in blat 2.6+)
  • %1 - is the email address. This is by default the contents of the Email Address for the administrator of this NetBackup Client field.
  • -i is the "From" portion of the email. This is not necessarily known to the email server. In this case it will be "From NetBackup."  There should be a valid email address specified here instead of "NetBackup", such as "admin@acme.com". (-i is no longer existing in blat 2.6+)
  • -server is the name of the SMTP server to use.
  • -q will suppress all output to the screen.
III. Configure NetBackup to use email notification
 
Now you are ready to send email, all we need is a valid catalog backup policy to enter the email address in the Disaster Recover tab.
 
Veritas recommends that you configure the NetBackup environment to send the disaster recovery information to a NetBackup administrator.

This backup-specific information is sent after every successful Catalog backup.

To send the information to more than one administrator, separate multiple email addresses using a comma as follows: email1@domain.com,email2@domain.com
 
Note: The disaster recovery email is not sent to the address that is specified in the Global Attributes properties.
 

Applies To

This document is designed to give a complete list of steps to configure email notification for Catalog Backup in NetBackup.
 
It will be necessary to have the following information to properly set up email notifications:
  • The email address of the NetBackup administrator who will receive the emails
  • A SMTP server that is configured to accept and relay emails. E.g. emailserver.company.com
 
It should be noted first that this document is primarily focused on Windows based platforms. UNIX platforms have a built-in Simple Mail Transport Protocol (SMTP) transfer method that Windows does not have. Windows requires a MAPI application or some other application that can transfer messages over SMTP. NetBackup has various .cmd files that assume an SMTP utility called BLAT is in place. The .cmd files that will be discussed assume BLAT is going to be used as the SMTP utility.

Blat is an open-source Windows Command Line SMTP Mailer utility and the most recent version of Blat can be downloaded from this site:  https://sourceforge.net/projects/blat/

Note: Blat is a third party product. It is not written, endorsed or supported by Veritas. Any problems with blat should be reported to the makers of blat directly. Veritas will be unable to assist with issues that are encountered when installing or using Blat.

 

Note: By default (except on a Veritas NetBackup appliance), the file ‘ /usr/openv/netbackup/bin/mail_dr_info.sh ‘ does not exist and this must be manually created.  For further details see the “Veritas NetBackup Administrator’s Guide Volume II” (section: NetBackup notify scripts), as this provides details on the script variables which can be used.

Refer to this article for the script details https://www.veritas.com/support/en_US/article.100049907

Was this content helpful?