NetBackup 脚本里面所说的 NB_MAIL_SCRIPT,在 Windows 平台上对应的就是 NetBackup\Bin\nbmail.cmd。

如果 nbmail.cmd 存在的话,NetBackup 会传递三个参数给这个 CMD 文件:

  • %1 is the recipient's address
  • %2 is the subject line
  • %3 is the message file name

NetBackup 推荐使用 BLAT 这个免费工具发送邮件通知。这个工具的安装很简单,将 blat.exe 放在 system32 目录下即可。设定方法:
blat -install <smtp server address> <sender's address>

完整语法如下:
-install <server addr> <sender's addr> [<try n times> [<port> [<profile> [<username> [<password>]]]]]

nbmail.com 调用 BLAT 的语句是:

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

其中:

  1. -i 参数后面跟的是发送者的名称,对应邮件里面的 From。如果在安装 blat 的时候已经设定了发送者,这个参数此处可以不配置。
  2. -server 参数后面跟的是 smtp server 的名称。如果不配置这个选项,默认使用 blat 安装时候的配置。
  3. -q 表示 Tell Blat to be quite when storing install settings in the registry.

Attention!!!

总结:nbmail.com 调用 BLAT 的语句可以简写为:
@blat %3 -s %2 -t %1 -i
其余参数可以采用 blat -install 时候的设置。

NetBackup 和邮件通知相关的批处理脚本(部分)

backup_notify.cmd
  • This script is called when a backup image is completed
  • This script receives one parameter: the program and the backup image name or path
backup_exit_notify.cmd
  • This script is called when a backup is completed
  • This script receives six parameters
    %1 = CLIENT – the client hostname
    %2 = POLICY – the policy label
    %3 = SCHEDULE – the schedule label
    %4 = SCHEDULE_TYPE – the type of schedule: FULL INCR UBAK UARC
    %5 = STATUS – the backup status for this job
    %6 = STREAM – the backup stream number for this job
bpstart_notify.bat
  • This script is called when bpbkar is started for a client backup
  • This script receives six parameters
    %1 = CLIENT_NAME
    %2 = POLICY_NAME
    %3 = SCHEDULE_NAME
    %4 = SCHEDULE_TYPE, one of the following: FULL, INCR, CINC, UBAK, UARC
    %5 = STATUS, always 0
    %6 = RESULT_FILE
bpend_notify.bat
  • This script is called when bpbkar is finished with a backup job
  • During an archive this script is called after the backup is complete and before the files are deleted
  • This script receives six parameters:
    %1 = CLIENT_NAME
    %2 = POLICY_NAME
    %3 = SCHEDULE_NAME
    %4 = SCHEDULE_TYPE, one of the following: FULL, INCR, CINC, UBAK, UARC
    %5 = Status of backup
    %6 = RESULT_FILE
session_notify.cmd
  • This script is called each time at least one regularly scheduled backup completes
  • This script receives no parameters
session_start_notify.cmd
  • This script is called prior to any backup or archive jobs
  • This script receives no parameters
nbmail.cmd
  • This script is used to configure email alerts when a job completes.
  • This script receives three parameters.
    %1 = recipient's email address
    %2 = the subject line of the email to be sent
    %3 = the file to put into the body of the email
dbbackup_notify.cmd
  • This script is called after all databases have been backed up
  • This script receives no parameters
userreq_notify.cmd
  • This script is called when BPRD gets list, backup, archive, or restore request
  • This script receives three parameters.
    %1 = operation requested
    %2 = client who requested the operation
    %3 = user who initiated the request
diskfull_notify.cmd

This script is useful if a disk reaches capacity. This script can be used to remove old files to free up space. By default this script will cause the operation to suspend for 5 minutes and then retry.

  • This script is called when a disk in full condition is encountered
  • This script receives two parameters.
    %1 = program name (bpdm or bptm)
    %2 = image file being written
restore_notify.cmd
  • This script is called when a restore, verify, duplicate, or import is attempted
  • This script receives one triplet parameter
    %1 = program name (bptm or bpdm) the image name and the operation requested.

Possibly Related Posts: (Automatically Generated)

Tags: , , , ,

3 Comments on 关于 NetBackup 邮件提醒脚本的补充

  1. wkf says:

    刚注册,进去后提示
    Invalid User specified. If you followed a valid link, please notify the administrator
    应该是没有权限,您给我提升一下权限,或者将用法发到我的邮箱,谢谢

    [Reply]

  2. wkf says:

    能不能直接告知blat的用法,从安装、使用、注册覆盖等一系列,好像不用绑定word文件或者*。rar文件作为附件

    [Reply]

  3. futuraka says:

    <a href=http://megasearchers.org/in.cgi?12><font COLOR="Magenta"><SIZE>"7"]<FONT>"Times New Roman"]<CENTER>conker porn</CENTER></FONT></SIZE></font></a>

    <a href=http://findit-fixit.sensorsmag.com/member.php?u=8254>prilokopa</a>

    [Reply]

Leave a Reply

*