Database Self Healing
Posted: Thursday 28 June 2018 0:10
Each time I have seen a problem with Domoticz database, it has been possible to tell from looking at the event log.
Suggest adding a “self healing” option in which Domoticz stores a backup of the DB every say 12 hours and if there is a problem identified with the database, automatically reverts to a previous version (and keep cycling through old copies of the DB until a working version without errors is found). Auto copy the corrupt db to a special folder called “corrupt dbs” or similar incase the user wants it in the future for some reason.
Store the backup db’s with a time / date in the file name, when a working db is found before copying it into place write the date time to a .txt with a flag saying it has been restored to x time which Domoticz checks for on startup so the user can be sent an automatic notification advising that self healing has had to revert to a previous version of the database.
I could (and will if necessary) write this functionality in a bash script that reads the Domoticz log, however I think that this would potentially be a valued feature integrated into the core of Domoticz.
Suggest adding a “self healing” option in which Domoticz stores a backup of the DB every say 12 hours and if there is a problem identified with the database, automatically reverts to a previous version (and keep cycling through old copies of the DB until a working version without errors is found). Auto copy the corrupt db to a special folder called “corrupt dbs” or similar incase the user wants it in the future for some reason.
Store the backup db’s with a time / date in the file name, when a working db is found before copying it into place write the date time to a .txt with a flag saying it has been restored to x time which Domoticz checks for on startup so the user can be sent an automatic notification advising that self healing has had to revert to a previous version of the database.
I could (and will if necessary) write this functionality in a bash script that reads the Domoticz log, however I think that this would potentially be a valued feature integrated into the core of Domoticz.