Pre Backup process - Script with argument

Last post 12-02-2019, 6:03 PM by efg. 3 replies.
Sort Posts: Previous Next
  • Pre Backup process - Script with argument
    Posted: 11-12-2019, 6:00 AM

    Hi,

    I would like specify a script (sh) with arguments in "Pre Backup process" Oracle Subclient.

    Example :

    /home/cvlt/script.sh dbname

    I tried many possibilities but "pre backup" task is always failed.

    Is it possible ?

     

    Thanks.

    Michaël

  • Re: Pre Backup process - Script with argument
    Posted: 11-13-2019, 6:47 AM

    Hi Michael,

    exit code must be 0 to be interpreted as successful.
    also you might need to redirect stdout / stderr to a file instead of returing it to Commvault.
    (allthough I never had problems with stdout from pre-scripts)

    did you specify the interpreter to use in the first line of the script ?
    e.g.: #!/bin/bash

    run "/home/cvlt/script.sh dbname ; echo $?" and verify the returncode

    BR
    Klaus

  • Re: Pre Backup process - Script with argument
    Posted: 11-27-2019, 1:36 PM
    • Aplynx is not online. Last active: 12-12-2019, 11:31 AM Liam
    • Top 10 Contributor
    • Joined on 05-04-2010
    • New Jersey
    • Master
    • Points 1,777

    theres a log on the CS itself for the scripts. startprepostcommand.log or something similar. 

    the log should show the code returned from the script when it was run. if the value is not 0 it is a failure. 

  • Re: Pre Backup process - Script with argument
    Posted: 12-02-2019, 6:03 PM
    • efg is not online. Last active: 12-06-2019, 8:50 AM efg
    • Top 10 Contributor
    • Joined on 02-02-2010
    • CommVault Tinton Falls NJ
    • Master
    • Points 1,687

    Hi Michaël,

    When passing arguments in to a script, be aware that Commvault (by default) passes additional arguments into that script as well.   This is defined in the documentation here: Commands and Arguments

    Also note that you will need to apply quotes to the command/script as well as the arguments.

    Let us know if this helps.

     


    Ernst F. Graeler
    Senior Engineer III
    Development
The content of the forums, threads and posts reflects the thoughts and opinions of each author, and does not represent the thoughts, opinions, plans or strategies of Commvault Systems, Inc. ("Commvault") and Commvault undertakes no obligation to update, correct or modify any statements made in this forum. Any and all third party links, statements, comments, or feedback posted to, or otherwise provided by this forum, thread or post are not affiliated with, nor endorsed by, Commvault.
Commvault, Commvault and logo, the “CV” logo, Commvault Systems, Solving Forward, SIM, Singular Information Management, Simpana, Commvault Galaxy, Unified Data Management, QiNetix, Quick Recovery, QR, CommNet, GridStor, Vault Tracker, InnerVault, QuickSnap, QSnap, Recovery Director, CommServe, CommCell, SnapProtect, ROMS, and CommValue, are trademarks or registered trademarks of Commvault Systems, Inc. All other third party brands, products, service names, trademarks, or registered service marks are the property of and used to identify the products or services of their respective owners. All specifications are subject to change without notice.
Close
Copyright © 2019 Commvault | All Rights Reserved. | Legal | Privacy Policy