Skip to main content
Question

Find VM restore points via API

  • October 31, 2024
  • 2 replies
  • 22 views

Forum|alt.badge.img+5

We have a bunch of older VM backups, where we only have some full backups left, like yearly and monthly backups.

We would like to create a script that shows us the available restore points to do some calculations on them.

 

Can anyone help me to find the available restore points via the Rest-API ?


Thanks in advance, Maurice

2 replies

Damian Andre
Vaulter
Forum|alt.badge.img+23
  • Vaulter
  • 1301 replies
  • November 8, 2024

This gets all jobs associated with a VM and may be what you are looking for:

https://api.commvault.com/docs/SP36/api/cv/VirtualizationOperations/get-vm-jobs/

 

You need to provide the VM GUID - I think the UUID in this request provides that: https://api.commvault.com/docs/SP36/api/cv/OpenAPI3/get-virtual-machines/


Forum|alt.badge.img+5
  • Author
  • Byte
  • 22 replies
  • November 14, 2024

Thank you Damian,

 

It was some work as the documentation is not complete, but I managed… I tried this before, but it was showing me only a few recent jobs, but now I have (I hope) a complete list:

 

"/v2/vsa/vm/<vmGuid>/jobs?completedJobLookupTime=1000000000&showAgedJobs=false&jobTypeList=14"

 

  • completedJobLookupTime=1000000000 to see older jobs, I could not find the max number yet, but 1 extra 0 makes that nothing is found.
  • showAgedJobs=false to avoid that you see aged jobs.
  • jobTypeList=14 to only see Synthetic Full backups. The number was found here: POST Jobs | Commvault®

Then from the results you can check on jobs.jobSummary.retainUntil

  • Monthly and yearly backups have a number what corresponds with the amount of days.
  • Synth fulls from daily backups contain an epoch timestamp

 

Is there a way to be sure that you see all jobs? Or what is the max that completedJobLookupTime can be?

 

Thanks, Maurice


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