Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NTBackup script for backup

Status
Not open for further replies.

snorkel

MIS
Mar 26, 2002
118
US
Hi. I need a simple script that I can use for a scheduled task that will backup a list of files/directories. I know this can be done, but all I find out on google are complicated scripts with media pools, etc. I just want the tape drive to backup the same files every day and overwrite ANY media it finds in the drive in order to do so. I don't want to append the media and I don't want the tape drive to care about overwriting the tape or what media pool it's in.

I know there are command line parameters, but I am dyslexic when it comes to putting those strings together into something useful - so don't rag on me. Please point me to a simple script that will do what I want.

Thanks in advance!!!
 
Okay - not being totally stupid, I have put together the following script. BUT... will the /UM option use whatever tape I have in the drive and have I set up the naming properly (or does that really matter).

C:\WINNT\system32\ntbackup.exe backup "@C:\backup\backup.bks" /n "DailyFull" /d "DailyFullBackup" /um /v:yes /r:no /rs:no /hc:eek:n /m normal /j "DailyFull" /l:f
 
You might wanna try posting this in the VBScript forum under programmers
 
I don't think this qualifies as programming!!!! I think I figured it out by banging my head against the wall and trying different script files until they pretty much cooperated and did what I wanted. Here is my final result which is basically from Microsoft KB article 239892:

echo off
rsm.exe refresh /LF"HP C1537A 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\Local Settings
\Application Data\Microsoft\Windows NT\NTBackup\data\Daily.bks"
/n "%computername%-%dtt%" /d "daily %dtt%" /v:yes /r:no /rs:no /hc:eek:n
/m normal /j "daily %dtt%" /l:f /p "4mm DDS" /UM
rsm.exe eject /PF"%computername%-%dtt% - 1" /astart
exit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top