RSM expert help needed for Backup question

  • Thread starter Thread starter Jordan
  • Start date Start date
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 /hc:on /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 /hc:on /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?
 
See tip 5955 in the 'Tips & Tricks' at http://www.jsiinc.com
The media variable will contain the tape.

See tip 5961.


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 /hc:on /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 /hc:on /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?


Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
 
Thanks Jerry,

I saw that on your site earlier, but there is a small problem with that.
When you use the /t option in ntbackup to call the media by NAME you run
into the typical Microsoft problem of them using the same name for multiple
things. In my batch file for NTBackup where I use the /n option to NAME the
tape, this NAME ends up as the NAME of the SIDE of the media while (for some
odd reason) the NAME of the actual MEDIA that RSM refers to is "NAME - 1"

This screws things up a bit because when I create a tape with NTBackup and
call the tape "Nightly Backup 2004-09-03" the RSM VIEW command will tell me
the name of the tape is "Nightly Backup 2004-09-03 - 1". There doesn't seem
to be a command for RSM VIEW or anything else that will tell me the name of
the SIDE of the media loaded into the drive.

I decided not to fight with this any longer and I ended up just using tip
5961 to get the MEDIA name and just strip off the " - 1" at the end with a
FOR /F batch file. I still don't like the hack, but then that is what we do
all the time now, right........

What the heck is with this SIDE stuff anyway? Backup tapes aren't like old
music cassette tapes where you could flip them over. I don't get the logic
behind this.

Thanks


Jerold Schulman said:
See tip 5955 in the 'Tips & Tricks' at http://www.jsiinc.com
The media variable will contain the tape.

See tip 5961.
 
Back
Top