at line number : 1
Invalid entry : 'PRESCHEDULEDCMD "C:\program
files\tivoli\tsm\baclient\Stopstuff.cmd"
ANS1038S Invalid option specified
Tim
William Boyer wrote:
When the script exits the condition code (ERRORLEVEL) of the last
command executed is used as the completion code for the script. In
your example, if the first net stop/start fails and the 2nd one
works....then the script will show zero completion...but it really
half-failed. You could always make this script complete
successfully just by putting any command as the last command that will
always give an ERRORLEVEL of 0. Like ECHO. Then no matter what the
rest of the script does, it will always show as completed
successfully.
The PRESCHEDULECMD is such that if the command returns with a non-
zero condition code, TSM client does not perform the backup.
I think on the POSTSCHEDULECMD you need to check the condition code
of the NET START's to alert you if they fail to start. You could
then be pro-active and get the services going before the users
discover it for you.
This is a good place to start if you need to get it going now, but
I really think you should look at condition code checking and
alerting on errors in the long run.
Bill Boyer
"A life? Cool! Where can I download one of those?" - ??
-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:[EMAIL PROTECTED] On
Behalf Of Timothy Hughes
Sent: Wednesday, August 22, 2007 2:24 PM
To: ADSM-L@VM.MARIST.EDU
Subject: Re: prescheduled postcheduled commands help
Thanks to all who responded I need and appreciate all of your help.
I am going to try some if not all of your suggestions. Since I
am new at this type of scripting I am going to Start with the
simplist form first. Here are the two scripts that I placed in the
C: \program files\tivoli tsm\baclient\
REM =====================
REM =====================
REM Tivoli storage manger 5.3.4
REM COMMAND TO START SERVICES
REM ========================
@ECHO OFF
set tsm_dir=c:\Progra~1\TivoliTSM\BaClient
C:
cd %tsm_dir%
net start "Update Services"
net start "World Wide Web Publishing Service"
REM===============================
REMREM
REM COMMAND TO STOP SERVICES
REM============================
@ECHO OFF
set tsm_dir=C:\Program files\tivoli\TSM\Baclient
C:
Cd %tsm_dir%
net stop "Update Services"
net stop "World Wide Web Publishing Service"
The dsm.opt file looks like this
PRESCHEDULEDCMD "c:\program files\tivoli\tsm\baclient\Stopstuff.bat"
POSTSCHEDULEDCMD "c:\program files\tivoli\tsm\baclient\Startstuff.bat"
LANG AMENG
DOMAIN ALL-LOCAL
TCPSERVERADDRESS
PASSWORDACCESS GENERATE
TCPCLIENTADDRESS xx.xx.xx.xx
NODENAME OFSWTUS1
subdir yes
replace prompt
tcpb 32
tcpw 63
SCHEDMODE PROMPTED
txnbytelimit 25600
errorlogname c:\progra~1\tivoli\tsm\baclient\dsmerror.log
SCHEDlogname c:\progra~1\tivoli\tsm\baclient\dsmsched.log
errorlogretention 14
schedlogretention 7
tcpnodelay yes
resourceutilization 3
LARGECOMMbuffers yes
CHANGINGRETRIES 2
COMPRESSIon Yes
BACKUPREG YES
MANAGEDSERVICES WEBCLIENT SCHEDULE
William, I understand your logic and condition code checking and I
read the Technote that Andrew pointed out. From what I have been
told if the commands don't work the backup will just fail with a
condition code. A couple of our backups are setup with presched
commands with ASR. If it does fail I will try your Condition Code
I am going to implement this for tonights backup hopefully it will
work. If anyone cares to add anything or see any possible errors
feel free to let me know.
Again Thank you all very much.
Tim
William Boyer wrote:
Maybe being an ex-programmer, but you have no condition code checking
to make sure that the NET STOP/START commands completed successfully.
If you NET STOP's don't work, do you still want to run the backup?
Now if the last NET STOP command fails, then the preschedulecmd
will return with a non-zero completion code and the backup will not
run. Maybe something like this:
REM StartStuff.cmd
Set LASTCC=0
Set MAXCC=0
Set LOG_FILE=c:\some\path\StartStuff.log
Echo Script start at %date% %time% > %LOG_FILE%
Echo Net stop "Update Services" >> %LOG_FILE% Net stop "Update
Services" >> %LOG_FILE% Set LASTCC=%ERRORLEVEL% If %LASTCC% EQU 0 goto
stop2 Set MAXCC=%LASTCC% Echo Stop of the Update Services service
failed with RC=%LASTCC% >> %LOG_FILE% Goto endit
:stop2
Echo Net stop "World Wide Web Publishing Service" >> %LOG_FILE% Net
stop "World Wide Web Publishing Service" >> %LOG_FILE% Set
LASTCC=%ERRORLEVEL% If %LASTCC% EQU 0 goto endit Set MAXCC=%LASTCC%
Echo Stop of the World Wide Web Publishing Service failed with
RC=%LASTCC% >> %LOG_FILE% Echo Net start "Update Services" >>
%LOG_FILE% Net start "Update Services" >> %LOG_FILE% :endit Echo
I
would
put in the dsm.opt file?
The dsm.opt file is below also.
1)Update Services
2) World Wide Web Publishing Service
Thanks in advance for any help!
TSM 5.3
TSM 5.3.4
AIX 5.3
LANG AMENG
DOMAIN ALL-LOCAL
TCPSERVERADDRESS xxxx.xxx.xxxxxx.xx
PASSWORDACCESS GENERATE
TCPCLIENTADDRESS xx.xx.xx.xx
NODENAME OFSWTUS1
subdir yes
replace prompt
tcpb 32
tcpw 63
SCHEDMODE PROMPTED
txnbytelimit 25600
errorlogname c:\progra~1\tivoli\tsm\baclient\dsmerror.log
SCHEDlogname c:\progra~1\tivoli\tsm\baclient\dsmsched.log
errorlogretention 14
schedlogretention 7
tcpnodelay yes
resourceutilization 3
LARGECOMMbuffers yes
CHANGINGRETRIES 2
COMPRESSIon Yes
BACKUPREG YES
MANAGEDSERVICES WEBCLIENT SCHEDULE
The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of the
addressee(s) and may contain information that is confidential,
privileged, and/or otherwise exempt from disclosure under applicable
law. If this electronic message is from an attorney or someone in
the Legal Department, it may also contain confidential
attorney-client communications which may be privileged and
protected from disclosure.
If you are not the intended recipient, be advised that you have
received this message in error and that any use, dissemination,
forwarding, printing, or copying is strictly prohibited. Please
notify the New York State Thruway Authority immediately by either
responding to this e-mail or calling (518) 436-2700, and destroy
all copies of this message and any attachments.
The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of the
addressee(s) and may contain information that is confidential,
privileged, and/or otherwise exempt from disclosure under applicable
law. If this electronic message is from an attorney or someone in
the Legal Department, it may also contain confidential
attorney-client communications which may be privileged and
protected from disclosure.
If you are not the intended recipient, be advised that you have
received this message in error and that any use, dissemination,
forwarding, printing, or copying is strictly prohibited. Please
notify the New York State Thruway Authority immediately by either
responding to this e-mail or calling (518) 436-2700, and destroy
all copies of this message and any attachments.
This e-mail (including any attachments) is confidential and may be
legally privileged. If you are not an intended recipient or an
authorized representative of an intended recipient, you are prohibited
from using, copying or distributing the information in this e-mail
or its attachments. If you have received this e-mail in error,
please notify the sender immediately by return e-mail and delete
all copies of this message and any attachments.
Thank you.