Skip to main content
Solved

Pre-Post script output


Forum|alt.badge.img+12

Hi Team,

When the pre-post script is run, does Commvault only look at exit code=0 or exit code=1? Are there any other exit codes we can check?

Best answer by Gseibak

@0ber0n - needs to be exit code 0

https://documentation.commvault.com/v11/expert/pre_processes_and_post_processes_overview.html

Scripts must return with exit code 0 in order for the next phase to start. If the script does not return with exit code 0, it is treated as a phase failure and the job is marked as pending

View original
Did this answer your question?

4 replies

Forum|alt.badge.img+11
  • Vaulter
  • 118 replies
  • Answer
  • January 8, 2024

@0ber0n - needs to be exit code 0

https://documentation.commvault.com/v11/expert/pre_processes_and_post_processes_overview.html

Scripts must return with exit code 0 in order for the next phase to start. If the script does not return with exit code 0, it is treated as a phase failure and the job is marked as pending


Forum|alt.badge.img+12
  • Author
  • Byte
  • 108 replies
  • January 9, 2024

Hi @Gseibak 

thanks for the explanation and the documentation link.

 

Best Regards.


Forum|alt.badge.img+12
  • Author
  • Byte
  • 108 replies
  • January 16, 2024

Hi @Gseibak 

Want to something else you about PrePost Script. I saw the following text in the documentation you forwarded.

  • You can use an echo command to check the level of a backup.

Based on this, I want to ask something.

We put a script in the PreScan phase and we want to reflect a message in this script to Commvault like this “Backup is Completed Successfully” or “Archive Log backup get an error” . Is that possible ?

How can we achive this ?

Best Regards.


Forum|alt.badge.img+11
  • Vaulter
  • 118 replies
  • January 16, 2024

Hi @0ber0n  - this link here may be useful - 

 

https://documentation.commvault.com/2023e/expert/pre_processes_and_post_processes_commands_and_arguments.html 

if you want to see ALL of the parameters we append use the echo with “%*” this way you can see the order of what is passed.

the docs mention “%6” is the -status parameter ( sixth parameter) but you may want to validate that by having your pre-scan script echo “%*” to see the order. 

keep in mind we only look for status code 0 so not sure what we would do with a string passed in but it would be fine for simply logging the info for tracking purposes.

 

 

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings