I have a small question regarding energy management feature which is very cool, by the way.
I need to transfer my HA to different machine (disk space is running out) and I would like to know is there any way to transfer energy data. Can’t find any file related and I don’t want to loose all my history.
Did this work?
I see a lot of issues with moving the energy data to the new installation and didn’t find a comment of someone actually successfully migrating.
I have toss Maria Db as it was problematic to restore. As of now I have changed machine with bigger disk and using build in database. Recommed rgis option as I have moved receantly twice to different machine and full backup kept everything.
I would like to describe my positive experience.
Recently, I performed an upgrade of my system from version 2022.11 to 2023.8.4, with a transition to a different PC (RPi3). I did not create a backup, preferring to reinstall all services anew, while retaining only automations and scripts. The most important concern for me was preserving the Energy Dashboard data, I didn’t care about any other data. On the old system, Recorder saved data to a MariaDB instance running on another computer, where I have set up Nextcloud.
During the initial shutdown, I left Recorder using the default storage location (~/.homeassistent/home-assistant_v2.db). After completing the initial setup, including the installation and configuration of the power meter and inverter, I switched Recorder to MariaDB, where the data from the old system was stored. As a precaution, I also backed up the HA data from MariaDB.
After restarting HA, there were numerous error messages in the log related to missing fields and data. Subsequently, the HA service initiated a database upgrade process, progressing from version 36 to version 41. During this process, indexes were optimized by adding new ones and removing outdated ones.
As a result of these actions, all the previous Energy Dashboard data, including consumption and solar energy production, were successfully preserved and appeared in the new HA instance.