As of vROps 8.2 there is a new king in town to backup and restore your vROps configuration from the API. Here is a quick look into this new feature.
As all of us are aware, backing up vROps configuration prior to vROps 8.2 is quite painful. You have to export dashboards, reports, views and super metrics, separately. Other things like the metric configuration, you have to copy to a text file if you want to be able to restore it.
But now in vROps 8.2 you can export all configuration in a single zip file.
I won’t go into much detail about backing up and restoring from the UI, it is quite self-explanatory. Just be aware that when you restore a configuration file into another vROps instance, you might end up with duplicate dashboards, views reports and so on. So it might be best to open the separate files and remove the dashboards and such that you do not wish to import.
The nicer part of this all is that you can also backup and restore your configuration from the API in vROps 8.2 and also check if the API call will succeed, live in SWAGGER (https://vrops.fqdn/suite-api/doc/swagger-ui.html)
Here is a quick overview:
Testing the API using SWAGGER
- For sure you should have a look at SWAGGER first. SWAGGER will tell you exactly what to do in the API. DO you already know that SWAGGER also allows you to run tests against your API?
- I am opening the section for ‘Content Management’. Over here I will click in the lock on the right side.
- This will open a dialog so you can logon in your vROps instance and run a test. Just add your credentials or generated API key. Have a look at this article by John Dias if you are unfamiliar with the vROps API.
- Great, now you will see a new button will appear on the right which says “Try it out“. This is the button that will show you if you can run this API call. A new button will appear called ‘Execute‘. Hit it!
- Yes, hit it!
- This seems to work, because the return code is 202!
Create a configuration backup from the API
- This test has passed. Now it is time to create a backup from the API.
- Open Postman
- POST https://vrops-fqdn/suite-api/api/content/backup/
- wait for it to complete and then run:
- GET https://vrops-fqdn/suite-api/api/content/backup/result.
- wait all you get now is a whole bunch of weird characters… this looks like a package, not?
- Can we save this?? Yes we can!
So there you have it, this is how you can create a backup of your vROps configuration from the API.
Restoring a configuration from the API
Restoring the configuration from the API is just as easy. Again, you can test this from SWAGGER as well.
Kim
Leave a Reply