Hey everyone,
there are various HA migration threads which have various “age ranges” and topics they focus on, so I wasn’t able to find confirmation for my most critical point: keeping the energy data (and ideally other statistics) intact from old to new system.
Status quo:
RaspberryPi3B (not +), SD card, conbee2 zigbee stick, quite a few missed out update steps
Home Assistant 2022.8.2
Supervisor 2022.12.1
Operating System 8.4
Frontend 20220802.0 - latest
New system I want to move to:
Raspberry Pi4B (2GB version), Flirc Case, msata2usb adapter with a 128GB msata SSD, probably USB extension cable for the zigbee stick to avoid the zigbee/usb3 interference issues
I’ve got working daily full backups, the last ones being around 50MB big. One thing I am a bit suspicious about: I setup automated daily backups in October (via Samba Backup), starting with 30mb and growing, but sometimes also newer backups that suddenly become SMALLER than the previous ones. Mid-November I e.g. had a week where the files were beyond 60MB. Is that expected behaviour or am I missing something?
That put aside, here are my considerations for the planned migration:
- Flash clean new HA OS install to msata/USB adapter via balena from my windows laptop
- Pull last full backup file from old system to the windows laptop
- Shutdown old Pi3 system and leave it untouched for now
- Boot up Pi4 with “empty”/clean HA and reconfigure my router to give the old IP to the new PI
- Reboot router and Pi4 and check if the new Pi has the old static IP
- if so: continue HA setup by choosing to recover from backup
- wait and pray
- cleanup what might be needed if the overall new system looks “good enough”
Am I missing out on something here? Is there something I can do to avoid a corruption of the sqlite db file? I testwise extracted the db file from a previous backup and opened it in a viewer app, there I didn’t get complaints about broken/corrupted records or whole db. Was that a lucky day or is that by now actually the usual case?
About sqlite and the energy data: for the worst case I do have the sqlite web addon running and do manual backups of the energy-relevant stats. So even if I end up with a corrupted db, I could start from scratch and manually add the old stats to a “placeholder entity” by tweaking the old data before the SQL insert.
Any hints or pointers are highly appreciated, I’m a tiny little bit nervous around this venture
Cheers!