Hardware Migration with additional considerations

I’m preparing myself for hardware migration, changing RPi4 into x84. I did read the docs, stating that it is possible by simply restoring full backup during initial setup, but because this will be the first time I’m doing this, I’d like to make sure if there are some things that I should especially look out for.

Notably, since I have a Zigbee dongle connected to USB (ZHA), how should I approach the migration? Should I first restore HA backup (before final deploy, for testing for example) and then, after making sure it goes smoothly, turn off RPi and plug the dongle into new machine? Will the new instance recognize it without any hassle and my whole Zigbee network will work as it should, with all the automations and such?

And what about specific hardware? Network card, USB ports will have different paths as I understand. Will it work out-of-the-box? Or should I worry about something?

Also, I wonder if it would be possible for me to change network connection from Wi-Fi to LAN, having the same IP address. Currently Wi-Fi is set to static in the config. I know I could change it there, but the window doesn’t allow mi to make both changes (Wi-Fi off, LAN on and static) at the same time so I’ll end up without network and I’m doing changes remotely so…Maybe there’s a way to edit something in the backup to manually change it? Or there will be a way during initial setup? Or maybe I should do it before the migration somehow? Any suggestions? :slight_smile:

Hi @Draghmar

Restoring the full backup is the way to do the migration.

You need to check that your HA instance references your Zigbee dongle by id, otherwise it will run into problems when the dongle is in a different USB port.

Go to Settings → System → Hardware → ALL HARDWARE. Hopefully you’ll see something like /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2434343-if00. The key bit is by-id. The name of your dongle could be different.

As long as you don’t have any other dongles then you don’t need to worry about things like network cards etc.

From memory, the new HA instance will not have a fixed IP, so you’ll need to set this once you have the new machine up and running.

I suggest you:

  1. Make a backup of your current instance.
  2. Shut down your current instance.
  3. Unplug the Zigbee dongle
  4. Install HA on the new machine
  5. Restore your backup
  6. Change the IP address
  7. Plug in your Zigbee dongle
  8. Restart the new machine.

If something goes wrong then you should be able to:

  1. Shutdown the new machine - or unplug it from the network
  2. Plug your Zigbee dongle into the old machine.
  3. Start the old machine.

I hope this helps.

2 Likes

I did this recently and it went very smoothly. My Zigbee dongle was on a powered USB hub and I simply plugged that into the new machine.

As I recall, HA on the new machine doesn’t actually start until after you’ve restored the backup - you’re offered the option as part of the setup.

Don’t you set a static IP address on the router? I didn’t have to change anything in HA.

If you use Bluetooth with internal adaptors, HA should discover the new one automatically, but it may continue looking for the one in the RPi - you can disable and delete that in the Bluetooth integration.

The only other thing I’d add is that you can use any Linux distro to make the bootable USB stick - it doesn’t have to be Ubuntu. I used Mint because I happened to have a stick ready-made and the GUI is great.

1 Like

Thanks both of you! With the information you gave me I’ve manage to do the first test run, to see how it exactly looks like. :slight_smile: Now I need to do some physical adjustments to the device I have and it’s HAT so it would fit perfectly and try to do the production run.

@templeton_nash Yup, my Zigbee dongle is indeed set through id: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0.
I was little bit surprised when found out that installing HA finishes with CLI instead of GUI. I mean, it’s perfectly reasonable, when you think about it, but I had this thing in head that I will see GUI and test everything offline.
Which also forced me to test how the network setup goes from CLI and after few bumps I’ve manage to set Wi-Fi up. Didn’t check the cable because I wasn’t near any at the time. So your steps seems accurate!

@jackjourneyman I used Manjaro for that as I’m using this on my old laptop.
I didn’t think about setting IP through DHCP server. I’m just used to always use the device’s settings for that, when available. But your suggestion is actually a great idea - I set MAC for new LAN port to be the same IP as current HA instance, so when I do the whole process and connect cable at the end, I should get the IP I want.

2 Likes

For the future reference, because it didn’t went as smooth as I’d like it to, I will describe a little bit what my issues were.

I’ve got to the restoring subpage and put the backup I did just before shutdown. I left it there because I read somewhere that it can take some time. Went with dog, prepare a tea and…it still got progress circle. So I started to check and decided that something was wrong. Unfortunately I didn’t have it hooked to the monitor but left it headless. After getting it back to the workbench I looked into logs realizing that the backup I’ve made had wrong Supervisor version (some minor difference) but the UI didn’t tell my that. :confused:
I loaded then previous one, that was new enough. And it did work without issues.

Then I stumbled upon some network problem. I’ve manage to prepare LAN connection with the IP I want and I disabled Wi-Fi to not interfere with the setup (I had some DNS cache issues and few others between finding what was the restore issue about). Just to realize that after setting it in the final place it didn’t connect to the network…dozen minutes later I came to conclusion that my PoE injector didn’t work properly - there was power but no data. I don’t have any spare one at the moment so i had to hook it to the monitor again and turn Wi-Fi on…it does finally work. Now I need to wait for PoE switch I ordered…

As for the HA config not everything was properly migrated. I lost SSH connection to the host (I totally forgot that there’s this very annoying way of getting it up), so I’m without access to convenient way of checking all logs.
I’m getting some error about kernel: Bluetooth: hci0: Failed to read codec capabilities (-22) but Bluetooth works so…I don’t know.
I had to reconfigure Tyua and SmartTings integrations.
Some weird disconnect happened once…I hope this was the last one.

And the device itself (Radxa X4)…geez how fast HA is with N100 and NMVe drive. :smiley:

Well done!

I personally feel that the lack of a progress indicator, when restoring backups, can cause lots of anxiety