Bug #11748
closedAutomated corruption recovery from cached ``config.xml`` backup files should check multiple backups
100%
Description
Apparently something went wrong during the saving in the environment of traffic shaping. The system was no longer accessible via the network. After a reset (power disconnect) the machine (pcengines / apu2) could only be accessed via the console in safe mode.
Autobackup was activated. The problem, the config.xml 0KB and the last backup hadm a file size of 0B. This leads to an unbootable system.
Older backup was available though. I assume that during a restore in the boot process the validity or on the file size (0B) is not checked.
In this case there should be a check to make sure that the backup file is valid and not corrupt.
Since older backups were available, this problem could definitely have been prevented.
The problem is the function /etc/inc/config.lib.inc:187 -> discover_last_backup() which looks for the last backup (timestamp) but does not check for a valid large, hash or xml validity.
The boot log is included in the attachment.
Files