Skip to main content
Solved

Auxiliary copy/Backup copy via api

  • September 27, 2022
  • 5 replies
  • 192 views

Forum|alt.badge.img

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.

Best answer by Mike Struening

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!

5 replies

Mike Struening
Vaulter
Forum|alt.badge.img+22
  • Vaulter
  • Answer
  • September 27, 2022

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!


Forum|alt.badge.img
  • Author
  • Novice
  • September 28, 2022

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


Mike Struening
Vaulter
Forum|alt.badge.img+22

Anytime!  See you on the next question 🤓


Scott Moseman
Vaulter
Forum|alt.badge.img+22

@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
 


Mike Struening
Vaulter
Forum|alt.badge.img+22

The Moseman knows, man!