Move data disk to new hardware

I have a RPi3 with external SSD data disk. The 3 is showing its age so I have a new RPi5. My current plan is to build the 5 with a new HA instance on a new SD card, shut the 3 down and move its data disk to the 5.

Will the 5 boot and be able to use the data disk from the 3? I’m not sure how hardware-agnostic the data disk files are (e.g. add-ons) - are they all in Python? Equally, I’m not certain of hardware differences between 3 and 5.

I’ll back up the 3 instance in full beforehand so, in worst case, could wipe the data disk, install it in the 5 and then restore the backup. But it would be much easier just to move the data disk over.

This wiki Common tasks - Operating System - Home Assistant suggests it’s possible to move the disk but it’s not clear whether hardware needs to be the same.

Thanks.

I would set up the RPI5 with a fresh install on an SD card, restore the backup from your 3. Once your are happy and has been running a few days wipe the SSD machine move to the 5. Once connected to a running HA you can use the move data to move off the SD card.

Well… the data disk successfully migrated from a RPi3 instance to a RPi5 instance. It spluttered a bit, but got there in the end. I took a backup first (and dd’ed the entire data disk to an image file) just in case but didn’t need it.