HewlettPackard / python-hpOneView

DEPRECATED - no longer actively maintained. New repository: https://github.com/HewlettPackard/oneview-python
MIT License
87 stars 57 forks source link

Where can I get a backup URI to restore devices on oneview ? #444

Closed KTEngineer91 closed 5 years ago

KTEngineer91 commented 5 years ago

I am trying to run the example script to restore devices on oneview:

https://github.com/HewlettPackard/python-hpOneView/blob/release/v4.8.0/examples/restores.py

This script says to use a backup uri. Here is the example one given:

uri_of_backup_to_restore = "/rest/backups/example_backup_2017-04-25_195515"

I am currently on oneview now and I'm trying to find a backup uri to use but I do not know how I can get this uri. I am able to create a backup under settings -> backup, but where can I find a uri to use on oneview ? Thank you for your time.

DungKHoang commented 5 years ago

Use the oneview_client.backups.get_all() and filter out on the name of your backup to find the uri

sijeesh commented 5 years ago

@saturnsbelt703 , as Dung suggested use get_all() to get the current backup URI. From the API doc: Only a single backup can exist on the appliance at a time - it is overwritten each time a backup is requested.