Hi Michael,
hereby included you'll find the VBscripts that we're using
for doing TSM backups. Note that if you think to use them
you'll have to install WSH 5.6.
Regards,
--Jean-Baptiste
------------------------------- TSMbck_incr_NTPDC.wsf ----------------
<job id="TSMbck_incr_NTPDC">
<script language="vbscript" src="C:\PROD\global\exe\BaseName.vbs"/>
<script language="vbscript">
dim FSO, LOGFILE, WSHSHELL
dim ENVIR, APPDRIVE, APPEXE,APPFIL,APPLOG,APPDAT,APPLIC
dim THOUR, TDAY
const ForReading = 1, ForWriting = 2, ForAppending = 8
APPDRIVE = "C:\"
ENVIR = "PROD"
APPLIC = "tsm"
APPEXE = APPDRIVE & ENVIR & "\" & APPLIC & "\exe\"
APPFIL = APPDRIVE & ENVIR & "\" & APPLIC & "\fil\"
APPLOG = APPDRIVE & ENVIR & "\" & APPLIC & "\log\"
APPDAT = APPDRIVE & ENVIR & "\" & APPLIC & "\dat\"
APPTMP = APPDRIVE & ENVIR & "\" & APPLIC & "\tmp\"
SCP_FNAME = wscript.scriptfullname
SCP_NAME = BaseName( SCP_FNAME )
THOUR = replace ( time , ":" , "" )
TDAY = replace ( date , "/" , "" )
set FSO = createobject("scripting.filesystemobject")
set WSHSHELL = wscript.createobject("wscript.shell")
set LOGFILE = FSO.createtextfile( APPLOG & SCP_NAME & "_" & TDAY & THOUR &
".txt", true)
LOGFILE.writeline("Script " & SCP_NAME & " started on: " & date & " " &
time)
LOGFILE.writeline("")
REM
------------------------------------------------------------------------------------
REM --- Start of script job. Put your commands below...
REM
------------------------------------------------------------------------------------
Do_Backup
sub Do_Backup()
dim TSMDIR,TSMEXE,TSMOPT,TSMCMD
TSMDIR="c:\program files\tivoli\tsm\baclient"
WSHSHELL.currentdirectory=TSMDIR
TSMDIR="c:\program files\tivoli\tsm\baclient"
WSHSHELL.currentdirectory=TSMDIR
TSMEXE="""c:\program files\tivoli\tsm\baclient\dsmc.exe"""
TSMOPT="-id=xxxxx -password=xxxxx"
TSMCMD="incr"
RC=WSHSHELL.run(TSMEXE & " " & TSMOPT & " " & TSMCMD,0,true)
if RC<>0 then
LOGFILE.writeline( SCP_NAME & ": ERROR --- dsmc.exe exited with RC=" &
RC & ". ---")
else
LOGFILE.writeline( SCP_NAME & ": INFO --- dsmc.exe exited with RC=" &
RC & ". ---")
end if
end sub
REM
------------------------------------------------------------------------------------
REM --- End of script job.
REM
------------------------------------------------------------------------------------
LOGFILE.writeline("")
LOGFILE.writeline("Script " & SCP_NAME & " ended on: " & date & " " &
time)
</script>
</job>
------------------------------end TSMbck_incr_NTPDC ------------
------------------------------------ Basename.vbs --------------
function BASENAME(FNAME)
dim FSO
set FSO = createobject("scripting.filesystemobject")
BASENAME = FSO.getbasename(FNAME)
end function
---------------------------------- end basename.vbs ------------
>From: "Regelin Michael (CHA)" <[EMAIL PROTECTED]>
>Reply-To: "ADSM: Dist Stor Manager" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: NT Script to check for failed backups
>Date: Mon, 27 May 2002 08:44:58 +0200
>
>Hi Jean-Baptiste,
>
>I'm really interested in your script. We are backuping about 50 NT servers
>and our only procedures is to catch information manually from the TSM
>server.
>
>However, we are soon applying a check within the TSM server that will show
>us if the backup failed or succeed.
>
>But i'm very interested in your solution. Could it be possible to look at
>the scripts.
>
>Thank's
>
>Mike
>
>-----Message d'origine-----
>De : Jean-Baptiste Nothomb [mailto:[EMAIL PROTECTED]]
>Envoyi : samedi, 25. mai 2002 20:17
>@ : [EMAIL PROTECTED]
>Objet : Re: NT Script to check for failed backups
>
>
>Hello,
>
>
>use WSH 5.6 and with the RUN method execute the dsmc command
>to backup your data. Result of the execution will be 0 if everything
>ok and >0 if an error did occur. That way it will be possible to
>send you a mail. If you're interested in the scripts write me back.
>
>Regards,
>--Jean-Baptiste
>
>
>
>
> >From: Justin Black <[EMAIL PROTECTED]>
> >Reply-To: "ADSM: Dist Stor Manager" <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: NT Script to check for failed backups
> >Date: Thu, 23 May 2002 17:02:37 -0400
> >
> >I am looking for an automated method to check for failed TSM and TDP
> >backups on an NT machine. We kick off different backups (using the TSM
> >scheduler and NT Services) on different machines on a daily basis and are
> >unable to manually verify (due to time constraints) that these are all
> >successful. We have noticed when failure occurs during a TSM backup of a
> >particular file, it is written to the NT EventLog. On our Unix platform,
>we
> >are able to do this and email messages are sent out when a failure
>occurs.
> >Any ideas how this can be accomplished on NT?
> >
> >Justin Black
>
>
>
>
>_________________________________________________________________
>Send and receive Hotmail on your mobile device: http://mobile.msn.com
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.