You are here: Plan > Using State and Status Arguments in Postscripts

Using State and Status Arguments in Postscripts

The functionality described in this topic (state and status arguments) applies only to postscripts for Use Data policies. Copy Data policies are not supported. Prescripts are not supported.

Certain positional arguments can be passed to a Use Data policy postscript for conditional logic. The arguments that can be passed are state and status. You can use the status argument, for example, if you want to perform an action only if a Use Data job completes successfully. Your script would perform the action only if the value of status were SUCCESS.

When passing the arguments via the Postscript field in the ECX user interface, the arguments must be surrounded by underscores ( _STATE_ and _STATUS_ ). When doing so, the arguments are replaced in the script with the actual corresponding values.

Specifically, to pass the arguments state and status, enter the following in the Postscript field:

/data/userscripts/<name of script> _STATE_ _STATUS_

The following is a simple example of code that can be added to a postscript (or can be its own postscript) in order to see the specific state and status values in the job log:

echo state $1

echo status $2

In the above script, $1 and $2 represent the arguments that are being passed in to the script from the Postscript field in the ECX user interface.

So for the above postscript example, the following output would display if the job ran in an Instant Access state and completed successfully:

state IA

status SUCCESS

Note: Passing _STATE_ or _STATUS_ to a script for an unsupported script type (such as prescripts) or an unsupported policy type (such as Copy Data policy scripts), simply passes “_STATE_” or “_STATUS_” as plain text.

The valid values for state and status vary depending on the Use Data policy type. Following is a table of valid state and status values.

Valid state and status values
Use Data policy type State Status
EMC VNX – Instant Access
  • IA
  • IA_END
  • IA_CANCEL
  • SUCCESS
  • FAILED
  • PARTIAL
EMC VNX – Restore Volume(s)
  • RESTORE_VOLUME
  • RESTORE_VOLUME_CANCEL
  • SUCCESS
  • FAILED
  • PARTIAL
IBM – Instant Access
  • IA
  • IA_END
  • IA_CANCEL
  • IA_PERMANENT
  • SUCCESS
  • FAILED
  • PARTIAL
IBM – Restore Volume(s)
  • RESTORE_VOLUME
  • RESTORE_VOLUME_CANCEL
  • SUCCESS
  • FAILED
  • PARTIAL
NetApp – Instant Access
  • IA
  • IA_END
  • IA_CANCEL
  • IA_PERMANENT
  • SUCCESS
  • FAILED
  • PARTIAL
NetApp – Restore Volume(s)
  • RESTORE_VOLUME
  • RESTORE_VOLUME_CANCEL
  • SUCCESS
  • FAILED
  • PARTIAL
NetApp – Restore Files
  • RESTORE_FILE
  • RESTORE_FILE_CANCEL
  • SUCCESS
  • FAILED
  • PARTIAL
VMware – Instant Virtualization
  • IV_TEST
  • IV_TEST_END
  • IV_CLONE
  • IV_PRODUCTION
  • IV_CANCEL
  • SUCCESS
  • FAILED
  • PARTIAL
VMware – Instant Access
  • IA
  • IA_END
  • IA_CANCEL
  • IA_PERMANENT
  • SUCCESS
  • FAILED
  • PARTIAL

 


Catalogic ECX™ 2.4

© 2016 Catalogic Software, Inc. | All rights reserved. | 7/15/2016

MySupportKnowledge Base | Trademarks | info@catalogicsoftware.com