How to Configure NTBackup Alerts
- Download and extract Blat for Server 2003 R2. My version is 3.2.17. (Note there is an x32 and x64 version)
- Copy the (blat3217) folder to C:\. It will contain 2 folders, docs and full. The blat.exe is the full folder.
- Register blat with the target mail server and email address of the user with access to the mail server at a cmd prompt: blat -install server_name your_email_address
- Open NTBackup and create a backup job. Specify a schedule for the backup.
- Make a copy of the following script to use for emailing the report (Give it a name, i.e. Portal D.bat):
set SMTP=smtp.domain.comset Subject=Backup Report
set LogFileFolder=%UserProfile%\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data
for /f “delims=” %%a in (‘dir /o:d /b “%LogFileFolder%\*.log”‘) do set LogFile=%%a
“C:\blat3217\full\blat.exe” “%LogFileFolder%\%LogFile%” -f %From% -to %To% -server %SMTP% -subject “%Subject%”
- Update lines 3-6 with your information for To, From, SMTP, and the report Subject line.
- Only update line 7 if your logs are in a different location.
- Update the C:\blat3217\full\blate.exe if your information is different.
- Open the Task Scheduler, then open the backup job you just created.
- Copy the entire command line for running the backup with all the switches created by NTBackup.
- Paste your command line into the script in place of the %Systemroot%\system32\ntbackup.exe … line.
- I always copy the line into a notepad file in case something goes wrong, I can put it back. Also, it gives you the option of adding switches more easily, if needed (maybe you want to rename the report with a date extension, for example).
- Now change the command line of your task to start the script, i.e. “C:\Backup\Portal D.bat”
- Change your Start In setting to C:\Backup.
- Enter your Run As user credentials.
16. The task will now run the backup, then at the end, it will go grab the most recently created report and email it.
So at times, if you need to rescue those older systems, you won’t have to channel your MacGyver-like creativity and ingenuity to work magic that would even make Angus himself take notice. The old adage “lack of planning on your part does not necessitate an emergency on my part” comes to mind. If you fail to plan, and don’t know your backups are trash, then you will have created your own emergency.
I remember a story I heard years ago about the folks from, we’ll call it Boldavia, who did not want to get behind in the space race. Forget going to the moon or to Mars, they said. Our ambitions are much higher, we’re planning a mission to the sun. Incredulous, the other countries’ brainiacs told them that it was absurd, they’d burn up! Not at all, the Boldavians maintained. We’ve planned this and thought it through very carefully. We’re going at night! So it all comes down to planning, but make sure your plan is sound. At the end of the day, we system admins still want to maintain the image of having the capability of walking on water, don’t we? By the way, I’ve heard some actually do! For those of us who have yet to add that feat to our repertoire, we can rest assured that we are covered while battling the effects of tryptophan.
About The Author
Donny Hilbern is a network and systems consultant specializing in analyzing, designing, and implementing network and enterprise systems. Donny has been working in the IT field for over 25 years, with nearly 20 years of that time invested in network and system administration and infrastructure technology. He has experienced a number of undocumented or lightly documented issues during that time. His desire is to leverage that experience in sharing about some of those issues and how they were resolved to make IT work for his clients.