1
22.7 Legacy Series / Re: Opnsense reverts to an old configuration
« on: November 13, 2022, 05:06:34 am »When it would revert, the previous version(s) would still be stored in the backup, which is accessible via (System -> Configuration -> History).Thanks for responding Ad.
In case it does automatically restore (which only happens when an un-parsable config is found), the machine would send a message to the (system) log about the event as well:
https://github.com/opnsense/core/blob/20a3c3da3869751ecacd306e267c53059a5f7973/src/opnsense/mvc/app/library/OPNsense/Core/Config.php#L330-L341
Best regards,
Ad
The code seems be logging the exception if the config cannot be restored. Where would I find that log -- just so that I can see what in the config is incorrect such that the restore fails with a ConfigException?
I checked my configuration history and originally had about 37MB of history. So the question still is why would it revert back to a config which was some months old and not the recent one?Also I haven't had this happen on every reboot and this definitely is intermittent.
In any case, since I was on the page, I reduced the Backup Count to 5 -- which effectively deleted all my old configurations from the history and kept only the latest ones. The hope is that next time it would just pick up one of the 5 latest configurations. I have reverted the Backup Count back to empty, so it would now save the history beyond the 5 recent files.
Under System>>Log Files>>Web GUI I do see the following a few times:
Code: [Select]
2022-11-07T16:38:20-06:00 Error lighttpd (configfile.c.1287) WARNING: unknown config-key: server.dir-listing (ignored)
but I am not sure if it is related to be honest.