is it possible that once ready, ntbackup send email of log file generated
during that session?
is it possible that once ready, ntbackup send email of log file generated
during that session?
You need to write a vbscript or so that launches ntbackup first then sends
the most recent log file from Document and Settings\username\Local
Settings\Application Data\Microsoft\Windows NT\NTBackup\data\*.log
You could write a batch file like so:
@echo off
1 set Sender=...
2 set Receiver=...
3 set Host=...
4 set Subject=...
5set folder=Document and Settings\%Username%\Local Settings\Application
Data\Microsoft\Windows NT\NTBackup\data
6 echo F | xcopy /d "%Folder%\*.log" "%temp%\Backup.log"
7 c:\tools\blat.exe "%temp%\Logs\Backup.log" -f %Sender% -to
%Receiver% -server %Host% -subject "%Subject%"
Line 6 grabs the most recent log file.
Line 7 uses one of the many command line mailers that you
can download, e.g. blat, mailto, sendmail.
the problem is where to call the batch file! Either i have to wait enough
where i know that backup is ready or ??? There is no run this.... batch
file..... after ready?
This is no problem at all if you do it like so:
@echo off
1 set Sender=...
2 set Receiver=...
3 set Host=...
4 set Subject=...
5set folder=Document and Settings\%Username%\Local Settings\Application
Data\Microsoft\Windows NT\NTBackup\data
6 c:\winnt\system32\ntbackup.exe /.. /.. /.. /..
7 echo F | xcopy /d "%Folder%\*.log" "%temp%\Backup.log"
8 c:\tools\blat.exe "%temp%\Logs\Backup.log" -f %Sender% -to
%Receiver% -server %Host% -subject "%Subject%"
As you see, the batch file will invoke the backup process.
It will then send you the backup report. Simple
I thought that while backup will run, batch file will continue
Thanks, I WILL try it.
It depends on the application that you invoke with the
batch file. With ntbackup, the batch file waits until
ntbackup.exe completes.
I use mksbackup.exe instead.
It write the status of the backup coming from the event log into the mail subject and send the log file but also
some other useful data like a listing and the free space of the target directory.
It is a single .exe file that use a .ini configuration file. It can use SSL, TLS and authentication to send email.
You can also choose between full, incremental or differential backup and the name of the archive depending the day of the backup.
It is free and well documented.
hope this help.
Bookmarks