Forum Discussion
Greg_Robinson_1
Cirrus
Feb 05, 2015iCall script to save the configuration to disk if any changes occur
I need a way for the F5 to periodically save the configuration to disk. We have a very dynamic environment with configuration changes occurring quite often and its vital to us that, say both devices ...
JRahm_128324
May 07, 2015Historic F5 Account
From Greg...
Got it!
Modify the 120 to whatever interval you want to look for changes, in seconds.
sys icall handler periodic F5.AutoSaveConfigScheduledTask {
interval 120
script F5.SaveConfig.OnlyIfModified
}
Here we are checking the BigDB.dat file to see if its been updated since the configuration was last saved. If so, we save the configuration to disk.
sys icall script F5.SaveConfig.OnlyIfModified {
app-service none
definition {
set dbfile_timestamp [exec stat /config/BigDB.dat --format %Z]
set conffile_timestamp [exec stat /config/bigip.conf --format %Z]
if { $dbfile_timestamp > $conffile_timestamp } {
tmsh::save sys config partitions all
}
}
description none
events none
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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