Forum Discussion
Leonardo_Silva1
Jun 22, 2021Altostratus
Big-IQ snapshot management
Hello community, I have an interesting situation that I want to run by you guys and hopefully somebody/someone can give me a hand. We have in our environment 20 Big-IQ devices, handling nearly ...
Leonardo_Silva1
Aug 06, 2021Altostratus
After this, we figured which snapshots are older than 90 days and we performed the following:
#Building up the 'restcurl' command for deletion
restcurl_delete = "restcurl -u admin:admin -d '{'items':[" + json.dumps(ids_to_delete) + "]}' -X DELETE /cm/asm/tasks/snapshot-config/"
#Here is the subprocess in action, to delete IDs one by one
delete_command = subprocess.Popen(restcurl_delete, stdout=subprocess.PIPE, shell=True).stdout.read()
We added a few 'prints' here and there within the .py script, to make sure the snapshot were deleted.
Anyway, I hope this can help someone, not only for this particular case, you can use it as a guide for python scripts where you cannot use the REST API calls against the Big-IQ or Big-IP, instead you have to execute Bash commands against the boxes for some particular reason.
Good luck!
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects