Question

Asked:
Asked By:
Nov 18 2008   2:29 PM GMT
Nets   5 pts.

Ntbackup How do i configure NTbackup to send me mail on outlook when a certain backup fails?


Outlook, Backup, NTBackup, NTBackup Configuration

How do i configure NTbackup to send me mail on outlook when a certain backup fails?

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



I don't think there is a native way to do this using NTBackup. You will need to build a shell script of some type around it and have the logfile emailed to you using a utility like Blat.

Here's a script using blat that I found that might meet your needs (use at your discretion with testing - I have not confirmed if this works or not):

@echo off
setlocal

Rem *************************************************************************
Rem Get date into variables so we can create good media name and BLAT message
Rem *************************************************************************

for /F "usebackq delims=" %%i IN (`date /t`) DO set dt="%%isbs"
for /F "usebackq delims=" %%i IN (`date /t`) DO set sbj="Back Name %%i (Backup)"
for /F "usebackq delims=" %%i IN (`date /t`) DO set msg="Backup description %%i"

Rem ********************************
Rem Perform backup to media pool LTO
Rem ********************************

rem C:\Windows\system32\ntbackup.exe backup "@C:\Backup\DailyFBU.bks" /d "Daily Backup" /v:no /m normal /j "Daily backup.job" /l:f /f "C:\DailyFBU.bks"


Rem *******************************************
Rem Set folder name containing backup log files
Rem *******************************************

set fld=C:\Documents and Settings\administrator\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data

Rem **********************************************************************
Rem This dir command will list all log files sorted by date in bare format
Rem **********************************************************************

set fcmd=dir "%fld%*.log" /OD /A-D /B

Rem ***********************************************************
Rem set command will set lastf variable to the last file in set
Rem ***********************************************************

for /F "tokens=* delims= " %%i in ('%fcmd%') do set lastf=%fld%%%i

Rem ******************************************************
Rem Delete prior Blat log file and prior lastbackuplog.txt
Rem ******************************************************

del C:\Backup\blat.log
del C:\Backup\lastbackuplog.txt

Rem ***************************************************************
Rem Copy Unicode log file to single-byte-per-character text file
Rem ***************************************************************

type "%lastf%" > C\Backup\lastbackuplog.txt

Rem *****************************************************************
Rem Mail latest Backup log file to techsupport with embedded text version
Rem *****************************************************************

C:\Backup\blat.exe "%lastf%" -server mail.domain.com -f notifications@domain.com -subject %sbj% -to recipient@domain.com -body %msg% -sig C:\Backup\lastbackuplog.txt -attach "%lastf%" -mime -debug -log C:\Backup\blat.log -timestamp
  • AddThis Social Bookmark Button

Browse more Questions and Answers on Exchange and Storage.

Looking for relevant Exchange Whitepapers? Visit the SearchExchange.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register