How do I configure NTbackup to send me mail on Outlook when a certain backup fails?

5 pts.
Tags:
Backup
Microsoft Outlook
NTBackup
How do I configure NTbackup to send me mail on Outlook when a certain backup fails?

Answer Wiki

Thanks. We'll let you know when a new response is added.

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

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following