Watching my webmin backups scroll by and wondering if timed backups are as wise as a backup ONLY on configuration change? Just a thought. No idea if it would be hard to implement. I guess almost like etckeeper?
Hello,
Thanks for the suggestion!
@Jamie, I think this is a good idea, what do you think? And, the simplest implementation on systemd-based systems might be to create a matching systemd.path unit for each Webmin configuration backup job.
The path unit could contain PathChanged= entries for all files included in that backup and trigger a one-shot service that runs the existing backup job. It can only watch the files’ parent directories, which would catch file replacements, newly created configuration files, and deletions.
Overall, this would provide immediate configuration backups for any type of change.
Depends what we define as a “configuration change” ? I feel like if a backup was executed every time Webmin touched any config file, it would be running them continuously!
I’ve gone months without making a change to the settings. Having a flurry of backups when doing changes would be much less. Or, make it a choice so that you can just turn it on and off while doing a paritcular session?
Yes, it should be clearly explained to the user which files should and should not be included in such monitoring. For example, many system configuration files can remain the same for a long time.
In the case of Webmin and Virtualmin, it would be much noisier by default, but there should be a way to communicate this upfront so users are careful when using it instead of the normal scheduled backup option.
What if you could instead setup a config backup to run every hour, but have it automatically skipped if there were no recent config file changes?
Like, just having a checkbox for scheduled backup to skip the backup if there were no changes?
Yes exactly!
Y’all here talking about config and file changes, and I guess this is applicable for static sites. But what about when there’s a database? Can DB changes be detected as easily?