For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

MaaS_170765's avatar
MaaS_170765
Icon for Nimbostratus rankNimbostratus
Sep 03, 2015

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

  • 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.