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

Check if tape is inserted before running ntbackup

Status
Not open for further replies.

sc7090

Technical User
Oct 28, 2003
21
0
0
IT
Hallo to everybody: i would like to know if it's possible to check if tape is inserted before running ntbackup. I call ntbackup from a batch file with at command: i have to stop some services to backup files but, if i forget to insert the tape, ntbackup stops and wait for the tape. Services starts only at the end of the backup but, in this case, i have to start them manually. It would be great, also, to have an escape routine: for example, if ntbackup stops waiting for a new tape, i wolld like to send a message to someone or something of that kind.
Any idea? thanks.
 
As for checking for the tape to be in, you may be sble to use the Drives Collection, Drive Object, and IsReady property. As for having the backup send you a message when it is waiting for a tape, it would depend on how you are doing the backup. Is it being done by a canned app or something you wrote yourself?

[blue]"Well, once again my friend, we find that science is a two headed beast. One head is nice, it gives us aspirin and other modern conveniences,...but the other head of science is BAD! Oh, beware the other head of science, Arthur; it bites!!" - The Tick[/blue]
 
It's a simple batch program that uses net start, net stop, ntbackup and net send programs to backup files. I think that the main problem is to understand when there is a problem because ntbackup doesn't send error messages, it only waits for the tape etc... On any case, at a certain hour i start the services that i stopped, calling net start from a different batch program: in this way a don't create problems to the users. Concerning the checking for the tape to be in, i will try the way you suggested and then let you know. Thanks.
 
The FileSystemObject.Drives Collection doesn't recognize the tape as a drive: it only finds floppy, hd drives and cd-rom.
The tape is considered a special device (i think) because it cannot be red via normal programs (like file manager and so on).
 
Well that does put a kink in things doesn't it. I have to admit that I'd never tried seeing a tape drive through WMI. Let me think about it and I'll post if any ideas come to mind.

[blue]"Well, once again my friend, we find that science is a two headed beast. One head is nice, it gives us aspirin and other modern conveniences,...but the other head of science is BAD! Oh, beware the other head of science, Arthur; it bites!!" - The Tick[/blue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top