Forum Discussion
Can I use iControlREST to list the existing UCS backups on my device?
I have a REST call to create a UCS file, and it is saved to the default location in /var/local/ucs. I also know how to restore a UCS file, by specifying the name of the UCS file to restore.
Is there a way to list all of the UCS files that exist in that directory, via REST? I am looking to create an easy web form for users to create backups of my devices, and then restore those backups at any time. But ideally I want to present a user with a list of possible backups to restore from.
2 Replies
- CBohannan_14046
Nimbostratus
{"kind":"tm:sys:ucs:ucscollectionstate","selfLink":""}
- MaaS_170765
Nimbostratus
I can update this thread with the answers I found myself. I have successfully set up a web form to either save or restore UCS files, using this method:
Save a UCS archive:
POST /mgmt/tm/sys/ucs
{"command":"save","name":"Tuesday.ucs"}Restore a UCS archive:
POST /mgmt/tm/sys/ucs
{"command":"load","name":"Tuesday.ucs"}It appears this command gets a 503 response (service unavailable) but the restore does happen on the LTM
Alternatively, restore a UCS archive:
POST /mgmt/tm/shared/sys/backup
{"action":"RESTORE","file":"Tuesday.ucs"}Note the different URL path. This command receives a 200 OK response immediately, and also initiates a restore on the LTM.
List existing UCS backups:
As of now (version 12.0.0 build 0.0.606), I am told there is a bug, ID 504814. A GET request to /mgmt/tm/sys/ucs does not return a list of UCS archive files available to restore. Therefore, my automation relies on the user knowing the name and location of a UCS file that they would like to restore.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com