Forum Discussion

benweber's avatar
benweber
Icon for Nimbostratus rankNimbostratus
Jul 27, 2020

F5 SDK - backup virtual server config to file

Hi all,

I am working to create a script using the python F5-sdk to rollout changes to 200+ VS objects. With the script, I'd like to take a backup config of each VS and save it locally before making my change. Is this possible with the F5 SDK? Reviewing the SDK, it looks like I can get the VS config with:

    vip_config_backup=b.tm.ltm.virtuals.virtual.load(name='test-2')

But saving it to a file is giving me issues.

Psudocode below:

1.) Capture VS objects in-scope.

2.) For each VS object:

2a.) Backup the VS object and save to file.

2b.) Apply policy.

2c.) Check VS object to ensure policy was applied successfully.

My goal with step 2a is to create additional functionality to restore a backup of just the VS if issues are identified.

Thanks!

No RepliesBe the first to reply