Clean Home Assistant installation, but migrate energy data history

Hi,

I want to create a clean installation of Home Assistant, as over time I have learned a lot and just wanted to start over. Thereby my storage is almost full. So I don’t want to restore a backup. I have migrated home assistant to an old laptop and want to use my NUC to reinstall a brand new version.

The only thing I don’t want to loose is my energy data. Is there a way to backup and restore the energy data?

Kind regards,
Matthijs

1 Like

Never tried this, but might work, conceptually:

  • export energy data from old system via sqlite addon for all relevant sensors
  • setup “empty” sensors in new system
  • if needed: adjust exported data (correct ids, stuff like that) to sensors in new system
  • import sensor data to new system

It’s a bit brute force, and maybe someone with more HA db manipulation experience could chime in to confirm or shake their head :slight_smile:

Hey, did you find a way to export your energy data?

Not in the way as described. I decided to make a partial backup with only the most necessary addons etc. That worked for me and was a lot easyer.