Corrupted energy data

Hi my disk filled up to 1005 while I was busy with life. this seems to have corrupted my Energy data.

I have obviously cleared some space and restarted docker container but i still get the following error.

Is there someway I can repair the db without losing all the data ?

  File "/usr/local/lib/python3.12/site-packages/homeassistant/components/recorder/util.py", line 228, in execute_stmt_lambda_element
    executed = session.execute(stmt)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 2308, in execute
    return self._execute_internal(
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 2180, in _execute_internal
    conn = self._connection_for_bind(bind)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 2047, in _connection_for_bind
    return trans._connection_for_bind(engine, execution_options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<string>", line 2, in _connection_for_bind
error from daemon in stream: Error grabbing logs: invalid character 'l' after object key:value pair

Its now running again but all the old data is missing.

Got it going by following

https://www.sqlite.org/recovery.html