Problem
- After a successful catalog backup, the primary server doesn't send DR email notification to respective users.
- We are able to send an email manually using mailx utility
- SMTP server details are correctly mention in file /etc/mail.rc
set smtp=<smtp_server_name>:<port_number>
- This is applicable to BYOS Linux primary server
- This only impacts NetBackup 9.1 and above
Within the NetBackup catalog backup policy, there is a ‘Disaster Recovery’ tab that contains the option ‘Send in an E-mail attachment ( recommended )’. If this option is checked when the catalog backup completes (successful or failed), on a UNIX/Linux master the file ‘ /usr/openv/netbackup/bin/mail_dr_info.sh ‘ is used to try and deliver the catalog backup results.
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.
/usr/openv/netbackup/bin/mail_dr_info.sh
NetBackup passes the following parameters to the script:
$1 Specifies the recipient's address. For multiple addresses, enter email1,email2
$2 Specifies the subject line.
$3 Specifies the message file name.
$4 Specifies the attached file name.
Error Message
The bpdbm log is showing error 126 while executing mail_dr_info.sh script
The bpdbm log location at master server:
- Unix: /usr/openv/netbackup/logs/bpdbm
- Windows: install_path\NetBackup\logs\bpdbm
07:00:33.785 [11570] <16> send_DR_report: failed to execute "/usr/openv/netbackup/bin/mail_dr_info.sh" "xxxxxxxxxx@xxxxx.xxx.xx" "NetBackup Catalog Backup successful on host xxxxxxxx status 0" "/usr/openv/netbackup/db/mail/xxxxxxxxx_1655067618" "/tmp/xxxxx/xxxxxxx_1655067618_INCR,/tmp/xxxxx/xxxxxxxxx_1655067618_INCR.drpkg" (126)
07:00:33.786 [11570] <4> db_error_add_to_file: Could not send DR report
07:00:33.786 [11570] <16> generate_DR_file_and_send_mail: Could not send DR report
07:00:33.786 [11570] <16> exec_catalog_DR_protection: Failed to send DR image to xxxxxxxxxx@xxxxx.xxx.xx (0)
Cause
The Primary server is running the NetBackup processes with a non-root user (service user feature of NetBackup 9.1 version) and the ownership of the script /usr/openv/netbackup/bin/mail_dr_info.sh
with a different user. The user mentioned in SERVICE_USER and ownership of the file "mail_dr_info.sh"
should match. It can be verified using parameter SERVICE_USER in file /usr/openv/netbackup/bp.conf
Note: The ownership of this file does not cause this issue with the pre-9.1 NetBackup version.
Solution
Modify the user ownership and group ownership of the script "mail_dr_info.sh
" to match the SERVICE_USER that is mentioned in the bp.conf
Here is an example
#cat /usr/openv/netbackup/bp.conf | grep SERVICE_USER
SERVICE_USER = nbu
#chown nbu:nbu /usr/openv/netbackup/bin/mail_dr_info.sh