Forum Discussion
Satoshi_Toyosa1
Apr 17, 2019Employee
You can generate a UCS file and download.
Generate
curl -sku admin: https:///mgmt/tm/sys/ucs \
-X POST -H "Content-Type: application/json" \
-d '{"command":"save", "name":"/shared/images/sat.ucs"}'
By default, ucs files are saved under
/var/local/ucs
. Here, /shared/images
is specified because it is the location where you can download files via iControl REST.
Get the size of the file
curl -sku admin: https:///mgmt/tm/util/unix-ls \
-X POST -H "Content-Type: application/json" \
-d '{"command":"run", "utilCmdArgs":"-l /shared/images"}'
Download the file
curl -sku admin: https:///mgmt/cm/autodeploy/software-image-downloads/sat.ucs \
-H "Content-Type: application/octet-stream" \
-H "Content-Range: 0-41609/41610" -o sat.ucs
Specify the size of the file in
Content-Range
header: Start (0) - Last (size -1) / Total size.
See Demystifying iControl REST Part 5: Transferring Files for more on iControl REST file transfer methods.