18-Jul-2014 15:40
I'm working on automating my development process so I want to be able to save/load a known state in my lab.
Essentially I want to be able to RESTfully call these commands: * tmsh save sys ucs Snapshot.ucs * tmsh load sys ucs Snapshot.ucs no-license
22-Jul-2014 04:44
Hi Brandon,
please have look to the following path with your rest client : /mgmt/tm/shared/sys/backup/example
/mgmt/tm/shared/sys/backup is the uri to play with. to restore a config : POST /mgmt/tm/shared/sys/backup {"file":"backup_bigip15.ucs","action":"RESTORE","generation":0,"lastUpdateMicros":0}
to backup a config : POST /mgmt/tm/shared/sys/backup {"file":"backup_bigip15bis.ucs","action":"BACKUP","generation":0,"lastUpdateMicros":0}
22-Jul-2014 12:25
Correct, these urls seem to be available only when you install rest package from management platform Big-IQ. i'm currently looking at the following but without success so far POST /mgmt/tm/sys/ucs { "command":"save", "options":[ { "test.ucs":"" } ] }
25-Jul-2014 09:52
Hi Brandon, we have been working on it internally and it seems that we do suffer from a bug on that subject. bug id is 449989. correct request should be : curl -v -sk -u admin:admin https://localhost/mgmt/tm/sys/ucs -H 'Content-Type: application/json' -X POST -d '{"command":"save","name":"test1.ucs"}' curl -v -sk -u admin:admin https://localhost/mgmt/tm/sys/ucs -H 'Content-Type: application/json' -X POST -d '{"command":"load","name":"test.ucs"}'
i advise you to open a case with this bugid to have correction in your existing release.
03-Oct-2014 13:27
As of 10/3/2014 there is bug ID 474895. Looks like it will be fixed in 11.6.0
24-Jul-2015 06:48
Bonjour Arnaud,
From the 11.6 and 11.52 release note you have : ID 449989 Can now save UCS when using iControl REST.
this synthax is working in 11.6 :
POST /mgmt/tm/sys { "command":"save", "options":[{"ucs":"test6.ucs"}]}
While the ucs is generated, there could be some timeout error or wrong feedback from the api.
Loading the ucs seems to be another story ...
07-Aug-2015
01:04
- last edited on
22-Nov-2022
07:14
by
JimmyPackets
Hi Arnaud,
Thanks for the reply.
My tests confirm that the issue is fixed in 11.5.3 release.
Saving and loading ucs are working even if there is timeout error or wrong feedback from the api.
You will bellow an extract of python code :
bigip_url_base = 'https://%s/mgmt/tm' % bigip_address
bigip = requests.session()
bigip.auth = (bigip_user, bigip_pass)
bigip.verify = False
bigip.headers.update({'Content-Type' : 'application/json'})
payload = {}
Load
payload['command'] = 'load'
payload['options'] = [{ 'ucs' : 'my-backup.ucs' },{ 'passphrase' : 'my-archive-password' }, { 'no-license' : '' }]
result = bigip.post('%s/sys' % bigip_url_base, data=json.dumps(payload))
Save
payload = {}
payload['command'] = 'save'
payload['options'] = [{ 'ucs' : 'my-backup.ucs' },{ 'passphrase' : 'my-archive-password' }]
result = bigip.post('%s/sys' % bigip_url_base, data=json.dumps(payload))
15-Mar-2016 08:30
Tested in V11.5.3
curl -v -sk -u admin:admin https://10.10.10.10/mgmt/tm/sys/ucs -H "Content-Type: application/json" -X POST -d '{"command":"save","name":"test.ucs"}'
curl -sk -u admin:admin https://10.10.10.10/mgmt/tm/sys/ucs/ -H "Content-Type: application/json" -X POST -d '{"command":"save","options":[{"test01":""}]}' | python -m json.tool
18-Sep-2018 08:26
See Creating and deleting a UCS archive https://support.f5.com/csp/article/K13225405ucs