Forum Discussion
Backup of Configs in F5
I am trying to create a python script using iControl REST to create a backup(ucs file) of the F5 configs and then download the file using tftp to another server.
The API endpoint that I am using is /mgmt/tm/sys/ucs. I do a POST with payload as
{'command':'save', {'options':[{'ucs':'test1.ucs'}]} . However I am getting a 400 error. Please let me know how to proceed further.
- Samir_Jha_52506
Noctilucent
Try with below commands, hope it will work.
POST /mgmt/tm/sys { "command":"save", "options":[{"ucs":"lab_backup_july21.ucs"}]}
Below syntax worked perfectly with V11.5
curl -v -sk -u admin:admin https://10.10.1.5/mgmt/tm/sys/ucs -H "Content-Type: application/json" -X POST -d '{"command":"save","name":"test_backup.ucs"}' curl -sk -u admin:admin https://10.10.1.5/mgmt/tm/sys/ucs/ -H "Content-Type: application/json" -X POST -d '{"command":"save","options":[{"test21_july":""}]}' | python -m json.tool
- sreebarcl_36723
Nimbostratus
This creates the backup however I am getting a 500 error as output though!
I verified the backup was created by logging into the f5 device and checking it
How to overcome this issue because after creating the backup I will have to copy the .ucs file to the local server as well
- Samir_Jha_52506
Noctilucent
Don't see any issue with Script. Check the if any extra variable has added n creating issue.
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