Move HA from RPI3 to 4 on 2023

Hello,
I got HA running on a RPI3 and finally got my hands on a RPI4 (4GB).

I know, that you can’t just switch the SD card,

Well, I did some research and found some ancient posts way back from 2020. A lot has changed since then in HA and I doubt that this will work. I also don’t like that there seems no official guideline how to do this. The Wiki about the backups is also not clear about this: Backup - Home Assistant

So just backup and restore it on a RPI4? Or is there a tool to alter the installation to make it compatible with a RPI4?

PS: HA runs on a RPI3, but it’s not really stable. My RPI3 uses 650MB of RAM and I have to be careful not to overdo it. e.g. If I try to start VSCode the Ram will fill up and crash the RPI (SD light will be green all time). Thats why I want to switch to a RPI4 with 4GB of RAM…

Thanks in advance,
Martin

Yep, just back it up and use that file during the setup on the new device. It’s really that simple!

PS I recently moved from a Pi3 to an old laptop I had sitting on a shelf for exactly the same reason you mentioned. It crashed/restarted pretty regularly due to running out of RAM and now it’s solid as can be.

1 Like

Oh - I didn’t know that there is a feature to add a backup file during Set-Up. The RPI4 will arrive in a few days - I’m going to test this :slight_smile:

PS: I’m glad to hear about the crashing RPI3. I have the feeling that the memory management of HA is not the best. If the device runs out of RAM the device should start to use SWAP or crash with an error.

In the specs, it says that HA will run on a RPI3, but from my experience you’ll only get happy if you don’t install any plugins. It should also not become an Opossum on crash. I actually left the RPI with the “always on” green SD-Card light for a couple of hours, to see if it may put itself together, but no luck.

It actually looks like poor low memory management, what I would consider as a bug. There should be either a minimum memory requirement or on installation of a plugin a check should be performed if the available memory is sufficient.

I’m not complaining, but it took me quite a while to figure out why the RPI turned itself into an Opossum …

Yep, I only really realized what was happening with mine after setting up a notification for when it restarts itself. Mine would restart about every 24 hours and then maybe once a week just crash hard until I power-cycled it. I also increased the swap memory which sorta helped but only delayed the inevitable; it would eventually seem to get in a rapid cycle of moving things between the 2 (even though the swap had plenty of free space) and then crash.

FYI - during the setup process on your new Pi, don’t be concerned by it seeming to just freeze for a while after you tell it to restore from your backup. It does this and you don’t get any real feedback until it just boots up when it’s finished. The first time I did it I got concerned and almost hard cycled it after a while.

Good luck and hope you enjoy the new Pi!

Thanks for the Info! I’ll report back once I get the PI and dove into the transfer.

Well, I guess it’s kinda a self-made problem. At first, I wanted just to read my power meter and solar inverter. Then I added 10 Tasmota power plugs + Tasmota Admin, HACS, DWD weather, rain radar, VSCode for some ESP-play, my 3d printers, … you get the idea :stuck_out_tongue:

Home Assistant is an awesome tool, and I’m a big fan of open source. Maybe they add some check in the future, which will tell you: Please upgrade your hardware if you want to install this plugin, or things will get unstable…

When HA supports RPI5 I’m going to do the same sort of thing moving from our 4 to 5 - I was wondering if you have any updates into your previous effort going from 3 to 4?