• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1099
  • Last Modified:

Can Windows Backup (ntbackup) email a backup report?

Hi,

I need to genertate reports or logs and have them emailed to me so I can see if the backups completed or failed without actually logging into the server.

Is there anyway to do this?
0
borgmember
Asked:
borgmember
1 Solution
 
Mitch1981Commented:
I wrote this and other script, you can find it to: www.windowserver.it

Bye.
0
 
borgmemberAuthor Commented:
Sorry, but I do not speak whatever language that site is in :)
0
 
Mitch1981Commented:
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
oBdACommented:
Complete the script below (variables and your ntbackup switches); it uses blat.exe (out it into the folder with the script) to send the email and will (hopefully) find and send the latest log file.
happy mailing: blat online
http://www.blat.net/

@echo off
setlocal
set From=backup@domain.com
set To=me@domain.com
set SMTP=smtp.domain.com
set Subject=Backup Report
set LogFileFolder=%UserProfile%\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data
 
%Systemroot%\system32\ntbackup.exe ...
 
for /f "delims=" %%a in ('dir /o:d /b "%LogFileFolder%\*.log"') do set LogFile=%%a
"%~dp0blat.exe" "%LogFileFolder%\%LogFile%" -f %From% -to %To% -server %SMTP% -subject "%Subject%"

Open in new window

0
 
borgmemberAuthor Commented:
I used this post to get it working. I also used information from this site: http://www.fishbrains.com/posts/154

I had to modify the script to fit my needs, but the middle part starting with %systemroot% now looks like this:

%Systemroot%\system32\ntbackup.exe backup "@c:\scripts\ntbackup\nightly.bks" /d "Nightly Backup" /v:yes /r:no /rs:no /hc:off /m normal /j "nightly" /l:s /f e:\nightly.bkf

Here is the contents of the nightly.bks file:

C:\
D:\
SystemState
0
 
quizwedgeCommented:
Instead of "%~dp0blat.exe", I used the actual path as "%~dp0blat.exe" didn't work for me, but what a great script!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now