I have managed to recover my DB for now from this post, doing a sqlite3 dump of the corrupted DB to a new DB then renamed bits.
Something odd though, this is the ls -l within HA of my config directory
But if I samba to the directory it looks like this

You can see the oddly named files HTLSH5~5 is actually the corrupt DB
Anyway, I am back for now so fingers crossed it is sorted.
