Solved

Auxiliary copy/Backup copy via api

  • 27 September 2022
  • 5 replies
  • 127 views

Badge +1

Hi,

Today I ran auxiliary and backup copies via a Windows batch script and the qoperation command/xml parameters.

It works well, but i wanted to do something more 21th centuries, more stable (the qcommand response sometimes change with new versions) and something redundant by using directly the webserver and the rest api.

But i don’t find how to do it in the documentation. We have the possibility to create an auxiliary copy, but not to launch it. I’m quite surprised. Please say i'm wrong.

Thank you.

icon

Best answer by Mike Struening RETIRED 27 September 2022, 20:46

View original

5 replies

Userlevel 7
Badge +23

I’m not seeing an option to run an Aux copy direct through REST API, though you can do a save as script for the Aux copy, then use the REST API to run that scrpt:

https://api.commvault.com/#fdd04c1a-2981-4ce3-a4d7-28ef9bf1e92d

I’ll check internally if there’s anything that we need to add to the docs.

Thanks!

Badge +1

Thank you very much Mike for your time and answer. I’ll do this.

Userlevel 7
Badge +23

Anytime!  See you on the next question 🤓

Userlevel 6
Badge +17

@Jérémie J 

The specific API calls may not exist, but this can still be achieved.

1)  Use the Save As Script option to generate an XML
2)  Use REST API /jsonobject to convert the XML to JSON
3)  Use REST API /CreateTask to initiate the jobs

I have not attempted this for Aux Copy or Backup Copy jobs, but I have done this for other features in the GUI which had the “Save as Script” option but no available API query.

Thanks,
Scott
 

Userlevel 7
Badge +23

The Moseman knows, man!

Reply