ADSM-L

Re: [ADSM-L] Selective backup completed with 0 error but backup status Failed 4

2007-10-29 10:00:17
Subject: Re: [ADSM-L] Selective backup completed with 0 error but backup status Failed 4
From: hshahizul <hshahizul AT GMAIL DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Mon, 29 Oct 2007 21:55:41 +0800
Thanks you very much Andy. I really appreciate you advice.

Tq and Tq

-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of
Andrew Raibeck
Sent: Monday, October 29, 2007 9:51 PM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: [ADSM-L] Selective backup completed with 0 error but backup
status Failed 4

Hi Tq,

You need to make sure your script exits with return code 0. For example,
instead of using

  exit

use

  exit 0

Since the operation of any script is unknown to TSM, it can only detect
"success or fail" status. This is why for schedules where ACTION=COMMAND,
the return code handling is a little different than for well-defined (to
TSM) actions, such as ACTION=INCREMENTAL or ACTION=RESTORE.

Thus it is up to the script author to code the script to set the return
code to 0 or other return code, depending on the results of the script.
This means your script needs additional error-handling capability in order
to exit with an appropriate return code. For example, if you are scripting
a backup action, and the dsmc return code is 0, 4, or 8, you can exit the
script with return code 0. If the dsmc return code is 12, you can exit the
script with some nonzero return code.

Go to the URL in my sig, and search on "script return code" for an article
that shows an example of how to set the script return code. You can also
consult your operating system (or other) documentation for further
scripting information, as this is not specific to TSM.

Regards,

Andy

Andy Raibeck
IBM Software Group
Tivoli Storage Manager Client Product Development
Level 3 Team Lead
Internal Notes e-mail: Andrew Raibeck/Tucson/IBM@IBMUS
Internet e-mail: storman AT us.ibm DOT com

IBM Tivoli Storage Manager support web page:
http://www.ibm.com/software/sysmgmt/products/support/IBMTivoliStorageManager
.html

The only dumb question is the one that goes unasked.
The command line is your friend.
"Good enough" is the enemy of excellence.

"ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU> wrote on 10/29/2007
06:35:59 AM:

> Thanks Andy for you reply.
>
> I do understand on the RC 4.
> How can I change this Failed RC 4 to Completed since it is hard to
convince
> management on the backup since it shows failed.
>
> Tq
>
>
> -----Original Message-----
> From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf 
> Of
> Andrew Raibeck
> Sent: Monday, October 29, 2007 9:19 PM
> To: ADSM-L AT VM.MARIST DOT EDU
> Subject: Re: [ADSM-L] Selective backup completed with 0 error but backup
> status Failed 4
>
> See chapter 7 "Automating tasks" in the client manual, section "Client
> return codes" for the answer to your question about why RC 4 shows as
> failed.
>
> The books can be found online by going to the URL in my sig (I recommend
> bookmarking this), and clicking the "Information center" link.
>
> Best regards,
>
> Andy
>
> Andy Raibeck
> IBM Software Group
> Tivoli Storage Manager Client Product Development
> Level 3 Team Lead
> Internal Notes e-mail: Andrew Raibeck/Tucson/IBM@IBMUS
> Internet e-mail: storman AT us.ibm DOT com
>
> IBM Tivoli Storage Manager support web page:
>
http://www.ibm.com/software/sysmgmt/products/support/IBMTivoliStorageManager
> .html
>
> The only dumb question is the one that goes unasked.
> The command line is your friend.
> "Good enough" is the enemy of excellence.
>
> "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU> wrote on 10/29/2007
> 06:07:12 AM:
>
> > Hi TSMer,
> >
> >
> >
> > TSM Server AIX 5.2
> >
> > TSM Server Ver 5.3.0
> >
> > Client 5.3.4 (windows)
> >
> >
> >
> > I have a question on these matters.
> >
> >
> >
> > I perform selective backup on TSM Client and exclude some files.
> >
> >
> >
> > I got backup status Failed 4 even though no error encountered.
> >
> >
> >
> > dsm schedule error shows.
> >
> > ==============
> >
> > 10/29/2007 13:46:36 ANS1909E The scheduled command failed.
> >
> > 10/29/2007 13:46:36 ANS1512E Scheduled event 'PC_SEL' failed.  Return
> code =
> > 4
> >
> > ==============
> >
> >
> >
> > I understand that while exclude some files in dsm.opt will result to
> this
> > errors.
> >
> > I tried to add this statement to cmd file (quiet)
> >
> >
> >
> > =============================
> >
> > cd C:\Program Files\Tivoli\TSM\baclient\
> >
> > dsmc selective -subdir=yes D:\SATJE\  quiet >> "C:\Program
> > Files\Tivoli\TSM\baclient\logs\inc_daily.log"
> >
> > exit
> >
> > =============================
> >
> > It seems that noti
> >
> > ng happened beside less information in the log files.
> >
> >
> >
> > So I tried to add "exit 0" at the end of cmd file and it does work.
The
> > backup status in completed.
> >
> > The question arise here, what is the impact of putting "exit 0" while
> the
> > backup is having an error and beside doing this, what is the correct
> > approach to eliminate Failed  4.
> >
> >
> >
> > Tq.