Hi,
I am interested to save on disk some items just before reboot: for example the graph data.
I am aware that we can set the graph to be saved at regular intervals. But this doesn't solve it really:
1- either the user sets a short interval (ie: 5 minutes) to secure a minimum data loss between last-save and reboot ... but at the downside of very frequent disk writes
2- or the user sets a longer interval (ie: 24H) but will have much longer data loss, at the upside of fewer data-writes
None of the above are really optimal, this is not the solution I am looking for.
Why am I confident something must exist behind the scenes?
The DHCP leases are preserved upon reboot, even when the DHCP server is specifically instructed not to save them on disk regularly.
Example:
My Mikrotik is configured to NOT store leases on disk: /ip dhcp-server config set store-leases-disk=never
Yet, once rebooted, the leases are being preserved and the DHCP server reports the lease time remaining for each individual lease granted pre-reboot.
Conclusion: at some point a fonction must be invoked just before reboot to write the DHCP leases.
I am interested to invoke this function to save, just before reboot other parameters, such as graph data.
Is there any pointer I can work with?
Kind Regards