Logs say that the database got corrupted and renamed so Home Assistant can boot up again.
But if I restart the Home Assistant (the only thing that helps is unplugging the plug and plugging it back in), I can’t find any renamed database - only the original one - and all historical the data is still there.
I even read up a bit on SQL and installed the SQLLite Web Addon and checked it using “pragma integrity_check;”. No errors are displayed here.
I would also check if you are having a power problem.
If the power supply is shared for PI and SSD, there can be noise and power problems seen in the data.
An external USB hub with it’s own power supply is recommended. (for instance)
I am using an 27Watt power supply as per recommondation for a Raspberry Pi 5.
It is a third party one but “should” also work.
But since I still suspect some problem with the NVME SSD I have now ordered a new SSD and also added a new NVME Header and the official Raspberry Pi 5 (27W) power supply … just in case there is a fault with my third-party one.