J
Jordan
I am trying to use NTBackup to handle my daily backups. My batch file can
handle the week day stuff, but appending weekend data to the tape is a
problem because I need to know the name of the tape in the drive so I can
append to it. I know RSM from the command line has ways of finding it out,
but my batch file skills are a little rusty.
Here is my current batch file for my nightly backups
================================
for /f "Tokens=1-4 Delims=/ " %%i in ('date /t') do set dt=%%l-%%j-%%k %%i
for /f "Tokens=1-2" %%i in ('time /t') do set tm=%%i %%j
set dtt=%dt% %tm%
Echo %dtt%
ntbackup backup "@C:\Windows\Daily Exchange.bks" /P "8MM AIT1" /j "Full
Backup with Exchange" /um /v:yes /r:yes /rs:no /hcn /m normal /l:s /n
"Nightly Backup %dtt%"
doze 120
ntbackup backup "@C:\Windows\SystemState.bks" /t "Nightly Backup %dtt%" /j
"Full Backup with Exchange" /a /v:yes /r:yes /rs:no /hcn /m normal /l:s
=====================================
Text probably wraps so it my be hard to read, but this is what it does:
1. Parse up the date so that it is in the format YYYY-MM-DD DayOfWeek
2. Parse up the time so that is is in the format HH:MM AM/PM
3. Run a full backup of my Exchange Data specified in file "Daily
Exchange.bks" and name the tape the "Nightly Backup 2004-09-03 10:00 AM" or
whatever the date and time is.
4. Run a backup of the remainder of the system and append to the tape.
What I want to do is run another backup and append to the tape over the
weekend, but I need to be able to find out what the name of the tape is that
is in the drive. I could make a script to guess, what the Friday tape will
be named by when the scheduled task runs, but I would rather not because so
much can be wrong when you assume that the task fired of at the exact moment
it was suppose to.
Can anyone help me find out how to get the name of the tape currently in the
drive?
handle the week day stuff, but appending weekend data to the tape is a
problem because I need to know the name of the tape in the drive so I can
append to it. I know RSM from the command line has ways of finding it out,
but my batch file skills are a little rusty.
Here is my current batch file for my nightly backups
================================
for /f "Tokens=1-4 Delims=/ " %%i in ('date /t') do set dt=%%l-%%j-%%k %%i
for /f "Tokens=1-2" %%i in ('time /t') do set tm=%%i %%j
set dtt=%dt% %tm%
Echo %dtt%
ntbackup backup "@C:\Windows\Daily Exchange.bks" /P "8MM AIT1" /j "Full
Backup with Exchange" /um /v:yes /r:yes /rs:no /hcn /m normal /l:s /n
"Nightly Backup %dtt%"
doze 120
ntbackup backup "@C:\Windows\SystemState.bks" /t "Nightly Backup %dtt%" /j
"Full Backup with Exchange" /a /v:yes /r:yes /rs:no /hcn /m normal /l:s
=====================================
Text probably wraps so it my be hard to read, but this is what it does:
1. Parse up the date so that it is in the format YYYY-MM-DD DayOfWeek
2. Parse up the time so that is is in the format HH:MM AM/PM
3. Run a full backup of my Exchange Data specified in file "Daily
Exchange.bks" and name the tape the "Nightly Backup 2004-09-03 10:00 AM" or
whatever the date and time is.
4. Run a backup of the remainder of the system and append to the tape.
What I want to do is run another backup and append to the tape over the
weekend, but I need to be able to find out what the name of the tape is that
is in the drive. I could make a script to guess, what the Friday tape will
be named by when the scheduled task runs, but I would rather not because so
much can be wrong when you assume that the task fired of at the exact moment
it was suppose to.
Can anyone help me find out how to get the name of the tape currently in the
drive?