Problem
How to configure email notifications only for Catalog Backup, for all NetBackup operation email notification, please visit KB article 100016001 below.
Solution
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.
% blat -install <server addr> <sender's addr>
% blat -install emailserver.company.com useraccount@company.com
% blat C:\testfile.txt -s test_subject -to useraccount@company.com
II. Configuring the " mail_dr_info" script:
- 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.
For Window: install_path\VERITAS\NetBackup\bin\nbmail.cmd
For Unix: /usr/openv/netbackup/bin/nbmail.sh
For Window: install_path\NetBackup\bin\mail_dr_info.cmd
For Unix: /usr/openv/netbackup/bin/mail_dr_info.sh
%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.
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 )
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
)
@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
)
%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.
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
Applies To
- 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
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