12.07.2015 Views

IBM Tivoli Storage Manager for UNIX and Linux: Backup-Archive ...

IBM Tivoli Storage Manager for UNIX and Linux: Backup-Archive ...

IBM Tivoli Storage Manager for UNIX and Linux: Backup-Archive ...

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

useful if you want to use specific options <strong>for</strong> a scheduled action that differ fromthe option settings normally used by the client node, or are different <strong>for</strong> eachschedule the node will execute.|||The schedmode option controls the communication interaction between the <strong>Tivoli</strong><strong>Storage</strong> <strong>Manager</strong> client <strong>and</strong> server. There are two variations on the schedule mode:client polling <strong>and</strong> server prompted.H<strong>and</strong>ling return codes from preschedulecmd <strong>and</strong>postschedulecmdscriptsBeginning with <strong>Tivoli</strong> <strong>Storage</strong> <strong>Manager</strong> Version 5.1, the scheduler exhibits thefollowing behavior when the preschedulecmd <strong>and</strong> postschedulecmd options areused:v If the comm<strong>and</strong> specified by the preschedulecmd option ends with a nonzeroreturn code, <strong>Tivoli</strong> <strong>Storage</strong> <strong>Manager</strong> considers the comm<strong>and</strong> to have failed. Inthis case, neither the scheduled event nor any postschedulecmd orpostnschedulecmd comm<strong>and</strong> will run. The administrative query event comm<strong>and</strong>with <strong>for</strong>mat=detailed option will show that the event failed with return code 12.v If the comm<strong>and</strong> specified by the postschedulecmd option ends with a nonzeroreturn code, <strong>Tivoli</strong> <strong>Storage</strong> <strong>Manager</strong> considers the comm<strong>and</strong> to have failed. Theadministrative query event comm<strong>and</strong> with <strong>for</strong>mat=detailed option will show thatthe event completed with return code 8, unless the scheduled operationcompleted with a higher return code, in which case the higher return codeprevails. There<strong>for</strong>e, if the scheduled operation completes with return code 0 or 4<strong>and</strong> the postschedulecmd comm<strong>and</strong> fails, the administrative query eventcomm<strong>and</strong> will show that the event completed with return code 8. If thescheduled operation completes with return code 12, that return code prevails,<strong>and</strong> query event will show that the event failed with return code 12.When interpreting the return code from a comm<strong>and</strong>, <strong>Tivoli</strong> <strong>Storage</strong> <strong>Manager</strong>considers 0 to mean success, <strong>and</strong> anything else to mean failure. While this behavioris widely accepted in the industry, it is not 100% guaranteed. For example, thedeveloper of the widget comm<strong>and</strong> might exit with return code 3, if widget ransuccessfully. There<strong>for</strong>e, it is possible that the preschedulecmd or postschedulecmdcomm<strong>and</strong> might end with a nonzero return code <strong>and</strong> be successful. To prevent<strong>Tivoli</strong> <strong>Storage</strong> <strong>Manager</strong> from treating such comm<strong>and</strong>s as failed, you should wrapthese comm<strong>and</strong>s in a script, <strong>and</strong> code the script so that it interprets the comm<strong>and</strong>return codes correctly. The script should exit with return code 0 if the comm<strong>and</strong>was successful; otherwise it should exit with a nonzero return code. The logic <strong>for</strong> ascript running widget might look like this:run ’widget’if lastcc == 3exit 0elseexit 1See the following references <strong>for</strong> more in<strong>for</strong>mation:v “Postschedulecmd/Postnschedulecmd” on page 311v “Preschedulecmd/Prenschedulecmd” on page 314v “Client return codes” on page 155502 <strong>IBM</strong> <strong>Tivoli</strong> <strong>Storage</strong> <strong>Manager</strong> <strong>for</strong> <strong>UNIX</strong> <strong>and</strong> <strong>Linux</strong>: <strong>Backup</strong>-<strong>Archive</strong> Clients Installation <strong>and</strong> User’s Guide

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!