Forum Discussion

Nik's avatar
Nik
Icon for Cirrus rankCirrus
Jun 23, 2015

downloading a ucs remotely without using bash?

I'm trying to create and download a ucs via icontrol so we can have on-demand backups however i've run into a roadblock - I can't seem to figure out how to download a ucs.

Here's how I'm creating the ucs:

curl -v -sk -u admin:password https://hostname.com/mgmt/tm/sys/ucs -H 'Content-Type: application/json' -X POST -d '{"command":"save","name":"blah.ucs"}'

I can see in the UI that it's been created however I haven't found any documentation about how to actually download the ucs. Anyone have an idea about how to do this via curl or otherwise?

  • You can either use SSH to get the file, or use the iControl System.ConfigSync.download_configuration(). I wrote a perl example that illustrated how to use the file chunked APIs in the System.ConfigSync interface in the Perl Config Sync CodeShare sample.

    You will likely need the iControlTypeCast.pm package as well for the script to work.

    If you look in the iControl CodeShare I also wrote a PowerShell version of this sample.

    I ran your curl command to create the .ucs and then this for the Perl code and the file was downloaded locally.

    $ perl ConfigSync.pl bigip.joesmacbook.com 443 admin admin download joe.ucs

    Hope this helps...

    -Joe

  • Dan_L1's avatar
    Dan_L1
    Icon for Nimbostratus rankNimbostratus

    Just to verify - there is no way to download a UCS file via a REST API call, correct? Even with version 12?

     

    Thanks!

     

  • Hi,

     

    you can add a script that move UCS in the file hosting section of the F5. so you can download it after.

     

    Pat