Page 1 of 1 1
Topic Options
#8437 - 2001-05-02 05:48 PM Almost finished ! NTbackup
Anonymous
Unregistered


Hi there all,

I've worked around with this script for NTBackup. The only thing is that:
1. Must get the shell command line to work.
2. I have to capture a error generated by NTBackup (No Tape), when executed as a batchfile.

Part of the script looks like this:
(The rest follows a little later)

code:


$osbackuptype = "Normal"
$osbackupname = "@WKSTA $osbackuptype Backup"
$oslogfile = "$dir\Friday_Error_$server.log"
shell "%comspec% /c NTBackup Backup C: D: /T "$osbackuptype" /v /d "$osbackupname" /b /hc: on /l "$OSLogfile" /e"
If @Error<>0
Cls
Color y+/n
? "An error has occured while executing NT Backup...!"


The problem is that this won't generate a logfile...
If I write this line to a Batch file, there is absolutely NO problem, but I can't capture the "No Tape in Drive" error message...???!!??

For the batch file I use this:

code:

$SMsg1 = 'NTBackup Backup D: /T $osbackuptype /V /D "$osbackupname" /B /hc: on /l "$oslogfile" /e '
$SMsg2 = Chr(13) + Chr(10) + "NTBackup Eject"
$Temp1 = Open(1, "C:\Backup\Start_NTBackup.cmd", 5)
$Temp1 = WriteLine(1, $SMsg1)
$Temp2 = WriteLine(1, $SMsg2)
$Temp1 = Close(1)
? "Command file to start NTBackup was created..."

Shell '%comspec% /c "C:\Backup\Start_NTBackup.cmd"'


Any suggestions are welcome!

Grtx, Eric


------------------
A l l Y o u r K I X A r e B e l o n g T o U s ! ! !

[This message has been edited by SLM (edited 02 May 2001).]

Top
#8438 - 2001-12-14 12:48 AM Re: Almost finished ! NTbackup
masken Offline
MM club member
*****

Registered: 2000-11-27
Posts: 1222
Loc: Gothenburg, Sweden
Kir@, did u manage to solve this? Would love to see some solution on how to check what tape is in the drive, and/or if a tape is in the drive etc..
_________________________
The tart is out there

Top
#8439 - 2001-12-14 12:23 AM Re: Almost finished ! NTbackup
Anonymous
Unregistered


Hi Masken,

I never solved this... I think it's not possible to do... ;-(
This is what I did:
Create an error file, when everything went OK, delete the file afterwards.
When something went wrong, make a new script that copies the error file to a specific WS.(witch is started after the backup is finished!)
Startup the services a few hours later when the backup is finished. So that all the services are started, even when the tape has crashed!

I could post you the whole script if you want to, but I'm not working for that company anymore... a friend of mine still does! ;-))
The script that I've put together worked for me and never disappointed me...

I'm not at this board quite often, but you can mail me at slminc90@yahoo.com if you want a quick response...

Grtx, Kir@

Top
#8440 - 2001-12-14 03:03 PM Re: Almost finished ! NTbackup
masken Offline
MM club member
*****

Registered: 2000-11-27
Posts: 1222
Loc: Gothenburg, Sweden
Ok, would like to have a look at that script

Thanks for answering, even though the thread was half a year old

_________________________
The tart is out there

Top
#8441 - 2001-12-15 05:31 AM Re: Almost finished ! NTbackup
Anonymous
Unregistered


Post it to you next week...!

Grtx, Kir@

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 323 anonymous users online.
Newest Members
Audio, Hoschi, Comet, rrosell, PatrickPinto
17880 Registered Users

Generated in 0.227 seconds in which 0.2 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org