Looking for REST or Q scripts

Last post 08-11-2017, 2:01 PM by Yashwanth. 2 replies.
Sort Posts: Previous Next
  • Looking for REST or Q scripts
    Posted: 08-10-2017, 7:16 PM

    Hi.  I need to automate backup jobs and setting indefinite retention on the jobs.  Does anyone have or know of example (or real) scripts developed for doing this?  I can start from scratch, but am hoping i can get something to jumpstart the process.  Thanks.


    RJ Davis – Sr Infrastructure Architect – rj.davis@vistraenergy.com – mobile 214-799-1250
  • Re: Looking for REST or Q scripts
    Posted: 08-11-2017, 9:12 AM
    • Ali is not online. Last active: 07-03-2019, 12:32 PM Ali
    • Top 10 Contributor
    • Joined on 08-05-2010

    Hi RJ, could you clarify the use case better and also what agent type are you using?

    Typically retention will be inherited by the Storage Policy copy, not required to set it on a per-job level.

  • Re: Looking for REST or Q scripts
    Posted: 08-11-2017, 2:01 PM


    You could use our "REST API - POST Create Task (Backup)" to trigger the backup with your specified retention type.

    retentionJobType The option to set job retention.

    Valid values are:

    • INFINITE, to retain this job indefinitely
    • NO_OF_DAYS, to prune the job after the number of days specified in the numberofDays parameter
    • STORAGE_POLICY_DEFAULT, to apply the retention rules of the associated storage policy


    Above mentioned is our official documentation link.

    Alternate link: https://apidocs.commvault.com/#942f81d4-f7b9-95ea-9e41-c23a55348056

    For more info: http://documentation.commvault.com/commvault/v11/article?p=features/rest_api/test_environment_postman.htm

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.
Copyright © 2020 Commvault | All Rights Reserved. | Legal | Privacy Policy