Recover from backup from pI 3 to VM missing energy history

The recovery are missing historic energy values. Have tried to recover many times with different backups. Allwas with the same result. Anybody that have any suggestion to solve this. The system on the pie are still running fine but I had planed to move to a VM the some more power. But the energy history are important to me to get transfered to the new system.

If you still have the storage for you old system and you are using the default database, copy the config/home-assistant_v2.db file to the new system.

This should be done while the new Home Assistant system is not running.

You can do this from the command line:

ha core stop

Copy your file into the new system using SSH or SAMBA. Then

ha core start

Tanks. i have now tryed to copy the db from the old HA to the new. At startup everything semed fine but after HA had started upp it created a new db and renamed the old to currupt. Ok the i tryed to fix the old db but with the same result. But the db can’t be corropt becuse it works on the pi. What is the problem here… I can’t understand.

Also stop the old system before copying the file.

Are the two systems the same core version?

Finaly I got every thing to work. I tryed a other backup and that work fine and i now have all sensors values. But I can’t find any resos for way it didint work the first 3-4 times when i tryed diffrent backups.