Extract SOME old data from "home-assistant_v2.db" and export to new home-assistant_v2.db file

My home-assistant_v2.db file is now near 8GB in size, accumulating data over years of playing with home assistant.

before i delete the file, there is ONE data set which I would like to keep: my electricity usage data (I have a energy usage monitor installed on my break circuit). It is just a single entity.

how do I merely extract this single data set and export it to a new “home-assistant_v2.db” file?

thanks in advance

1 Like

It is a SQLLite DB. You should be able to write a sql select to get the data out and back into a new one.
Maybe this can help finding the data. (I have not used it)

This sounds similar to a post that I posted, but unfortunately did not get a response. I would really love to be able to have an offline huge database and a smaller on HA itself so tagging this to see if someone would know a solution!

Have you looked at the influxdb addon?

Yes.

I want to include influxdb addon as part of my normal home assistant installation.

And I would like to be done with my data extraction before I slow down the my entire home assistant with influxdb. :smiley:

I hope this would help in your data export.
https://www.tim-kleyersburg.de/articles/longtime-statistics-home-assistant/
Then you can easily put them in any new base you want to use