NTBackup Scripting...


S

Sean Rector

Hello,

I'm having trouble with scripting NTBackup on a couple of
machines. The problems are that the log does not get
created, and the media that is created is not added to the
available media under the Restore tab. Here is my script:

@Echo Off
rsm.exe refresh /LF"ARCHIVE Python 04106-XXX SCSI
Sequential Device"
sleep 30
for /f "Tokens=1-4 Delims=/ " %%i in ('date /t') do set
dt=%%i-%%j-%%k-%%l
for /f "Tokens=1" %%i in ('time /t') do set tm=-%%i
set tm=%tm::=-%
set dtt=%dt%%tm%
c:\winnt\system32\NTBACKUP.EXE backup "@C:\Documents and
Settings\Administrator.Active01\Local Settings\Application
Data\Microsoft\Windows NT\NTBackup\data\Weekday
Backup.bks" /n "%computername%-%dtt%" /d "Daily %
dtt%" /v:yes /r:no /rs:no /hc:blush:n /m normal /j "Daily %
dtt%" /l:s /p "4mm DDS" /UM
rsm.exe eject /PF"%computername%-%dtt% - 1" /astart
exit

On two machines, the above problems occur. On a third
machine, I get a window w/ MSTask.exe, w/ the text "The
command completed successfully." and "Cannot run the
program specified" which stays open, then ntbackup opens
up, and it starts looking for a particular tape. When it
cannot find the tape, it waits for me to insert the tape,
or cancel, which ends the MSTask window, and the backup
never occurs.

Please help. Also, please do not suggest buying
BackupExec or other 3rd party program - that kind of
suggestion is not helpful to resolving this scripting
problem.

Thanks!
Sean
 
Ad

Advertisements

G

Geoff King

Sean,

I just got done working this script for a client. I had to up the sleep
variable to 60 for the rsm.exe refresh command to complete. (Server is using
a HP DDS3 tape drive).

Not sure on your log issue or the available media issue as the script did
exactly what I wanted which was allow an unattended backup without prompting
for any user input.

I made an attempt to add the error routine to send a message to the
scrataries workstation that she did not put a tape in the drive, but I found
that there was a considerable delay from the time a tape was put into the
drive and the time that it was detected by the script so had to remove it.

As for the 3rd machine, it most likely does not have the sleep command,
you'll need to check if it has the Resource Kit installed for whatever
server version you are working on.

And, I left Echo ON and just ran the batch file from the command prompt
during testing and not through the Task Scheduler. Made it much easier to
debug.

Geoff
 

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

Top