Jerold
I have edited the script as follows :
@echo of
IF {%1}=={} @echo Syntax: FreeMedia TapeString&Exit /b
setloca
set string=%
set string=%string:"=
call :silent>nul 2>&
if not defined media @echo No media in librar
endloca
exit /b
:silen
for /f "Tokens=2-15" %%a in ('rsm view /tlibrary /guiddisplay^|Findstr /i /c:"%string%"') do
if not defined tape if not {%%n}=={} set tape=%%
if not defined tape if not {%%m}=={} set tape=%%
if not defined tape if not {%%l}=={} set tape=%%
if not defined tape if not {%%k}=={} set tape=%%
if not defined tape if not {%%j}=={} set tape=%%
if not defined tape if not {%%i}=={} set tape=%%
if not defined tape if not {%%h}=={} set tape=%%
if not defined tape if not {%%g}=={} set tape=%%
if not defined tape if not {%%f}=={} set tape=%%
if not defined tape if not {%%e}=={} set tape=%%
if not defined tape if not {%%d}=={} set tape=%%
if not defined tape if not {%%c}=={} set tape=%%
if not defined tape if not {%%b}=={} set tape=%%
if not defined tape if not {%%a}=={} set tape=%%
rsm INVENTORY /LG%tape% /AFUL
@ping -n 31 127.0.0.1>nul
for /f "Skip=1 Tokens=2-19" %%a in ('rsm view /tphysical_media /cg%tape% /guiddisplay^|Findstr /v /c:"The command"') do
if not defined media if not {%%r}=={} set media=%%
if not defined media if not {%%q}=={} set media=%%
if not defined media if not {%%p}=={} set media=%%
if not defined media if not {%%o}=={} set media=%%
if not defined media if not {%%n}=={} set media=%%
if not defined media if not {%%m}=={} set media=%%
if not defined media if not {%%l}=={} set media=%%
if not defined media if not {%%k}=={} set media=%%
if not defined media if not {%%j}=={} set media=%%
if not defined media if not {%%i}=={} set media=%%
if not defined media if not {%%h}=={} set media=%%
if not defined media if not {%%g}=={} set media=%%
if not defined media if not {%%f}=={} set media=%%
if not defined media if not {%%e}=={} set media=%%
if not defined media if not {%%d}=={} set media=%%
if not defined media if not {%%c}=={} set media=%%
if not defined media if not {%%b}=={} set media=%%
if not defined media if not {%%a}=={} set media=%%
@ping -n 6 127.0.0.1>nul
for /f "Skip=1 Tokens=2-15" %%a in ('rsm view /tpartition /cg%media% /guiddisplay^|Findstr /v /c:"The command"') do
if not defined part if not {%%n}=={} set part=%%
if not defined part if not {%%m}=={} set part=%%
if not defined part if not {%%l}=={} set part=%%
if not defined part if not {%%k}=={} set part=%%
if not defined part if not {%%j}=={} set part=%%
if not defined part if not {%%i}=={} set part=%%
if not defined part if not {%%h}=={} set part=%%
if not defined part if not {%%g}=={} set part=%%
if not defined part if not {%%f}=={} set part=%%
if not defined part if not {%%e}=={} set part=%%
if not defined part if not {%%d}=={} set part=%%
if not defined part if not {%%c}=={} set part=%%
if not defined part if not {%%b}=={} set part=%%
if not defined part if not {%%a}=={} set part=%%
rsm deallocate /pg%part
@ping -n 6 127.0.0.1>nul
rsm freemedia /pg%media
C:\WINDOWS\system32\ntbackup.exe backup "@D:\Support.SNL\Scripts\Dagelijks.bks" /J "Dagelijks.bks" /G%tape% /A /V:yes /M normal /hc
@ping -n 6 127.0.0.1>nul
rsm eject /pg%media% /ASTAR
And start the backup proces with
Freemedia DL
the backup log says :
Invalid command line parameter '/G3ED5F8BD196941E69E495A2F5A2BDE57'
I'm quite lost now... What am i doing wrong (forgive my ignorence as I am NOT a script wizzard)
Mar
----- Jerold Schulman wrote: ----
On Tue, 11 May 2004 00:16:02 -0700, "Mart" <
[email protected]
wrote
I am trying to make a daily backup with ntbackup on a 35gb DLT drive directly connected to the server. At the beginning of the week I want to put in a tape and remove it at the end of the week. Thus at the end of the week I want to have 5 backup sessions on 1 tape. I've scheduled a batch file with the following command :
Backup Status
The operation was not performed because an invalid Removable Storage GUID was specified.
COMPAQ CRN-8245B BB9F9EDA0F9A4B3695122F805CB2D582
Quantum DLT tape drive 3ED5F8BD196941E69E495A2F5A2BDE57
See tip 7914 and links in the 'Tips & Tricks' at
http://www.jsiinc.com
'rsm view /tphysical_media /cg%tape% /guiddisplay
where %tape% is GUID you the tape drive, 3ED5F8BD196941E69E495A2F5A2BDE57
Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com