NTBackup

  • Thread starter Thread starter MDS
  • Start date Start date
M

MDS

Hey, I'm looking for a lot more info about NTBAckup.
Things like the used logfile, or the logfile to be used, and the result code
for NTBackup

The reason is that we are writing a script to launch NTBAckup from VBS and
send us a mail after the backup with some results...Execpt the filesize of
the backupfile I can't see anything more, but reading the automaticly
created log file has a lot more data...but which log file has been used? ;-)

Marc
 
Run them under different accounts, or split the files according
to which folder they back up.
 
No, you cannot give a parameter for the log file. You split
them when processing their contents, then take
appropriate action. Here is how you would do it in a batch
file, assuming that you run 4 separate backups, and that
each backup job has a header that identifies the
department whose data was backed up.

@echo off
set Source=set Loc=C:\Documents and Settings\config\Local Settings\
Application Data\Microsoft\Windows NT\NTBackup\data
set Dest=c:\BackupLogs
set Limit=4

rem Copy the 4 most recent log files to %Dest%
if exist %Dest% rd /s /q %Dest%
dir /a-d /b /od "%Source%" | more +%Limit% > %Temp%\temp.txt
for /F "tokens=*" %%* in (%Temp%\temp.txt) do copy "%Source%\%%*" %Dest%

rem Examine these log files and take action according to their content
for %%a in (%Dest%) do (
find /i "Finance Department" %%a && call :Finance
find /i "HR Department" %%a && call :HR
find /i "Assembly Department" %%a && call :Assembly
find /i "Accounting Department" %%a && call :Accounting
)
goto :eof

:Finance
DoSomething
goto :eof

:HR
etc.

I have tested the code in general but not in detail.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top