Solved

Please help my NTbackup PITA

Posted on 2004-09-04
7
350 Views
Last Modified: 2013-12-19
I have 1 server in particular that is running NTbackup on a nightly basis to backup the HD partitions and the system state. The backup is only about 10GB with a DDS3 "WangDAT Model 3400DX SCSI Sequential Device" drive.

I am using a script compliments of IronWill that inventories the drive and then runs a backup. A copy of the script is at the bottom.

I have this EXACT same script in MANY other instances that is working flawlessly, but I have been playing with this for a long time and I have yet to find a solution for this one. The problem is that every time it starts the script, it will give me "The operation was not performed because no storage media was specified." every single time. However, I took the time one day to completely Free every tape and try again and it was then sporatic (ie working 1 day out of the week). I have also cleaned the drive a few weeks ago just to see if it may be related to dirty heads.

I can schedule it or I can run it manually and it still usually gives the same error.

I am at a loss, I would give anything for someone to fix this PITA.

-------------------------------------------
:begin
setlocal
cd /d "D:\Backups\"

rem for /f %%a in ('ntdate -f %%A') do set varDayName=%%a
set varDayName=%1
for /f %%a in ('ntdate -f %%Y') do set varYear=%%a
for /f %%a in ('ntdate -f %%m') do set varMonth=%%a
for /f %%a in ('ntdate -f %%d') do set varDay=%%a

set varWeek=%2
rem set varWeek=%varWeek:~-2%
if not "%3"=="" set varWeek=%varWeek%%3
set varTapeName=Week %varWeek% - %varDayName%

rem If %varDayName%==Friday (set varBackupType=Normal) Else (set varBackupType=Incremental)
set varBackupType=Normal

:backup

rem Run an inventory to refresh the currently loaded tape
rem Rename the name below to the tape drive in the server
rsm inventory /lf"WangDAT Model 3400DX SCSI Sequential Device" /AFULL
sleep 120

rem Below is Windows Server 2003 ntbackup command
start "" /wait ntbackup backup "@D:\Backups\Daily.bks" /n "%varDay%/%VarMonth%/%VarYear%" /d "Backup set created %varYear%/%varMonth%/%varDay%" /v:no /r:no /rs:no /hcRed Facen /m normal /j "Daily" /l:s /p "4mm DDS" /um

rem Change UserName on the following two lines to the user account that the backups run under
for /f %%a in ('dir "c:\Documents and Settings\abertram\local settings\application data\microsoft\windows nt\ntbackup\data\*.log" /od /b') do set varLog=%%a
set varLog=c:\Documents and Settings\abertram\local settings\application data\microsoft\windows nt\ntbackup\data\%varLog%
type "%varLog%">>BackupMail.txt


rem Find and calculate totals
for /f "tokens=*" %%a in ('type "%varLog%"^|find "Backup started"^|find /n "Backup started"^|sort /r') do set varBackupStarted=%%a
set varBackupStarted=%varBackupStarted:[1]=%
for /f "tokens=*" %%a in ('type "%varLog%"^|find "Backup completed"') do set varBackupCompleted=%%a

set varDirs=0
for /f "tokens=2" %%a in ('type "%varLog%"^|find "Directories:"') do call :countdirs %%a

set varFiles=0
for /f "tokens=2" %%a in ('type "%varLog%"^|find "Files:"') do call :countfiles %%a

set varBytes=0
for /f "tokens=2" %%a in ('type "%varLog%"^|find "Bytes:"') do (set varBytesTemp=%%a) & (call :countbytes)

rem Only usable by Windows 2000
rem set varSkipped=0
rem for /f "tokens=2" %%a in ('type "%varLog%"^|find "Skipped:"') do call :countskipped %%a


echo.>>BackupMail.txt
echo Totals:>>BackupMail.txt
echo %varBackupStarted% 1>>BackupMail.txt
echo %varBackupCompleted% 1>>BackupMail.txt
echo Directories: %varDirs% 1>>BackupMail.txt
echo Files: %varFiles% 1>>BackupMail.txt
rem echo Skipped: %varSkipped% 1>>BackupMail.txt
echo MegaBytes: %varBytes% 1>>BackupMail.txt
echo.>>BackupMail.txt



:sendmail
rem The folder below is the location of the Pickup folder for your SMTP server
rem Use a UNC path if the folder is on another machine

Blat BackupMail.txt -subject "IDT Reliant Backed up %varBytes%MB" -to customerbackups@idatatech.net
del BackupMail.txt


endlocal
goto :eof



:countdirs
set /a varDirs=%varDirs%+%1
goto :eof



:countfiles
set /a varFiles=%varFiles%+%1
goto :eof



:countbytes
set varBytesTemp=%varBytesTemp:,=%
set varBytesTemp=%varBytesTemp:~0,-3%
set /a varBytesTemp=%varBytesTemp%/1024
set /a varBytes=%varBytes%+%varBytesTemp%
goto :eof



:countskipped
set /a varSkipped=%varSkipped%+%1
goto :eof
--------------------------------------------
0
Comment
Question by:Daace21
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 11

Accepted Solution

by:
nazirahmed earned 250 total points
ID: 11981079
Hi
as you mentioned the same script works fine on other machines and the machines gives error even if you schedule or run manually, this leads to the problem with the system not the script. is this server 2k or NT? Most of the time, i have seen NTbackup going wrong and never recovered, unless system re-install(which i did once only to see if it fixes the prob and it did). I am still using ntbackup on few machines and its working, but have switched either to arc server or backup exec.  a very basic thing, before you start backup, is your backup media listed in hardware devices?
i am posting a link here which has ntbackup troubleshooting tips, maybe it leads you to something which you are missing.

Troubleshooting Tape Backup Issues in Windows NT
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q162/9/72.asp&NoWebContent=1
good luck
0
 
LVL 1

Author Comment

by:Daace21
ID: 11981122
Thanks for the link.  I too think it has to do something with the drive.  However, I just cleaned the drive and ran the backup job again and it worked, but I don't see it working again by itself.  I'll check out that link.  Thanks!
0
 
LVL 1

Author Comment

by:Daace21
ID: 11981124
Also, the OS is WIN2K3.  People still use NT? :)
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 11

Expert Comment

by:nazirahmed
ID: 11981241
:) oh yes..there are a lot of people who are still on NT4! im one of them:)
BTW here is another link form EE which may give you some lead, its about win2k server
http://www.experts-exchange.com/Operating_Systems/Win2000/Q_20855978.html

0
 
LVL 1

Author Comment

by:Daace21
ID: 12002603
I've already looked at that post. :(  no luck
0
 
LVL 1

Author Comment

by:Daace21
ID: 12031721
Hello?
0
 
LVL 11

Expert Comment

by:nazirahmed
ID: 12154124
sorry for late reply. I am sorry to say but i have seen many people having trouble with windows backup, either they switch to some other software or rebuild the machine. cant suggest more than that.
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever set up your wireless router at home or in the office to find that you little pop-up bubble in the bottom right-hand corner of Windows read "IP Conflict - One of more computers on the network have been assigned the following IP address"…
This is the first one of a series of articles I’ll be writing to address technical issues that are always referred to as network problems. The network boundaries have changed, therefore having an understanding of how each piece in the network  puzzl…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question