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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ntbackup problem

Status
Not open for further replies.

khalidaaa

Technical User
Jan 19, 2006
2,323
BH
Hi Guros,

I have a problem with one of my servers' backup script. The server is running Windows 2000 SP1. When the scheduled backup job starts at night it fails giving this error message:

Code:
The operation was not performed because no unused media was available.

The backup script is this:

Code:
REM
echo Tape Backup   >c:\backup.log 
echo Backup Start time: >>c:\backup.log
date /t>>c:\backup.log
time /t>>c:\backup.log
REM
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%
SET SUBJ=" Backup Status Unknown"
REM 

start /wait rsm.exe refresh /lf"Dell (tm) PowerVault (tm) 110T DLT VS80"

C:\WINNT\system32\NTBACKUP.EXE backup "@C:\Daily.bks" /d "DAILY %dtt%" /v:no /r:yes /rs:no /hc:on /m normal /j "%dtt%" /l:s /p "DLT" /UM

if %errorlevel% EQU 0 goto :succ

goto fail
:succ
SET SUBJ="Backup Successfull"
echo Backup Job Successfully Completed >>c:\backup.log
goto cont
:fail
SET SUBJ="Backup Fail"
echo Backup Job Failed >>c:\backup.log
:cont

REM
echo Backup Finish time: >>c:\backup.log
date /t>>c:\backup.log
time /t>>c:\backup.log
REM
echo  *************************************  >>c:\backup.log
echo  ****Please Ignore This Log File******  >>c:\backup.log
echo  *************************************  >>c:\backup.log
REM
Rem Set folder name containing backup log files
set fld=C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\

Rem This dir command will list all log files sorted by date in bare format
set fcmd=dir "%fld%*.log" /OD /A-D /B

Rem set command will set lastf variable to the last file in set, i.e. the latest one
for /F "tokens=* delims= " %%i in ('%fcmd%') do set lastf=%fld%%%i

Rem Mail latest log file to Group
blat "%lastf%"  -t operator@mycompany.com -c khalid@mycompany.com -mime -s %SUBJ% -f BackupManager@mycompany.com -attach "c:\backup.log"
exit

I just added this line:
start /wait rsm.exe refresh /lf"Dell (tm) PowerVault (tm) 110T DLT VS80"

to the script as recommended by a link that i found on the net:


The backup finished successfully for two days and then back to the problem above!

Then i have to run the backup interactively using the ntbackup utility of the Windows (doing a dumy backup) and then i be able to run the above script with no problem and it finishes successfully!

I'm really confused and don't know what to do! My senior is saying that this is because the operators had changed the tapes (bringing another machine tapes which has that machine data) and puting it in this machine!

My senior is saying that this problem might be cleared off once we finish the tapes for the whole month but i don't see this as an exceptable solution! this shouldn't happen even if the above case occurs!

Any thoughts?

Regards,
Khalid
 
Thanks linney

Yeah i've looked into the google and yes you are right there are alot of info over there but because they are alot i couldn't have the time to try them! and i'm talking about a production server so i'm a little bit worried about trying any thing! That's why i thought of asking you guys for your experience with this

But thanks for pointing this out and i'm still reading and looking over there for something useful.

Regards,
Khalid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top