Lost graph data for updating entities such as temperature

Hey there,
I have several sensor entities in my Home Assistant setup that update their status regularly, such as temperature, humidity, air quality, door open/closed status.
In the past I was able to click on those entities and in the popup I saw a graph of their state data over the past 24 hours.
A few days ago the behaviour changed, when I clicked the popup displayed the graph but it showed only a straight line even though the reported data was fluctuating.
Now when I click those entities it only shows me the current data and the most recent update time.

I’d like to get the graph back as before but I’m not sure how, is anyone able to help me out?

Maybe your database has been fubared and recording no more data.

Stop HA, rename the database file and restart. You will lose your data, but it should start repopulating.

OK, that seems like a good suggestion.
So I will lose past data about entity states but it won’t mess with my overall setup right?
Where does the database file live?

yes

in the same folder as configuration.yaml. The name is home-assistant_v2.db

Found it, renamed it, restarted Home Assistant, and… no change.
I checked to see if a new DB file had been created in that location, and it hasn’t.
Not sure where to go from here, any suggestions?

Do you think taking a full snapshot of my Home Assistant instance, doing a clean install, and restoring from my snapshot would work?
I have a few other quirks that maybe this would help with, for example the OS can never be updated from the Web UI, and HACS can not install anything ever.
Perhaps this is my best course of action at this point?