My Home Assistant is running on an Intel NUC. I want to move it to another NUC. I’ll call them NUC1 and NUC2. Here’s my process:
Perform a full backup of NUC1 to an external storage location.
Unplug the Ethernet cable from NUC1 to avoid conflicts. (There is no WiFi).
Flash an M.2 SSD with Home Assistant 10.3
Install the newly flashed M.2 into NUC2.
Boot NUC2.
I get the welcome to Home Assistant and set up an account name, password, location, etc.
I log onto Home Assistant at 192.168.1.54:8123 on NUC2.
I set up the external Storage on my NAS. Same as NUC1.
I go to System/Backups and find my most recent backup from NUC1.
Click on the file and select “Restore”.
Restore completes (I think).
But, I cannot connect to the front end of Home Assistant on NUC2.
I tried www://homeassistant.local:8193, www://192.168.1.54:8193, even through DuckDNS. All say “Unable to connect”.
The HomeAssistant CLI on the monitor connected to NUC2 looks normal. The splash screen reports IPV4 as 192.168.1.54/24. “Network info” shows the same IPV4 address. “Hardware info”, well it scrolls offscreen too fast to read anything and I can’t pipe to more ( | more). A network IP scan shows the correct IP, hostname and MAC address for NUC2.
Even Automations and Node-RED flows are running on NUC2.
I just can’t connect to NUC2 Home Assistant front-end.
I had this issue before, can’t remember what was the cause, but I remember that I hooked my NUC via HDMI to a TV so I could see the boot sequence which helped me solve it.
The two NUCs are identical. As I said, I flashed HAOS to the second M.2 SSD, booted it and got the expected setup windows. Everything worked fine until I did a system restore from the first NUC. After that I could not connect with the UI at 8123. The observer at 4357 looked normal and I could tell that automations and Node Red flows were working. Home Assistant was running but I could not connect to the UI. I have done a dozen or more system restores over the years and they have all been like clockwork until now. I am open to suggestions.
Can you hook up a monitor to the HDMI port and watch it boot? See if it is getting caught up on something.
Do you have a static IP? Or is that what your router assigned? The .54 is where you found it, BUT did your backup have a static IP set?
If your IP is dynamic then I am curious how your DuckDNS hairpin is setup on your router? Is it pointing to a specific IP? Is it pointing to homeassistant.local?
It is either a network issue OR it is not fully starting.
Both are DHCP with the router set to permanent lease (static).
The what? (Hairpin)? I installed the DuckDNS Add-on and in the router set up forwarding for 443 and 8123. But, you may be on to something. Looking at the Port Forwarding table in the router, I had forgotten that the forwarding was IP specific:
This might explain why nothing I do from the network was going to get me to 192.168.1.54 because of the DuckDns add-on. It would also explain why Home Assistant automations are running.
If this theory is correct, I have a couple of ideas. (Your input would be appreciated).
Option1:
On NUC1: Make a backup as is with DuckDNS installed.
Remove NUC1 from the network.
On NUC2: Install Home Assistant as before then
Set a fixed IP on NUC2 (Settings → System → Network) to NUC1’s old IP address (192.168.1.57).
Perform a restore from the NUC1 backup.
Reboot.
Since NUC2 will now have the IP address of NUC1, everything should work as before.
Option2:
Change the port forwarding table in the router from 192.168.1.57 to 192.168.1.54.
That would be true. It also occurred to me that many of my Node Red flows are hard coded with the 192.168.1.57 address.
It was originally going to be a temporary replacement while I analyze why NUC1 was crashing every day or so. But since the NUCs are identical otherwise it makes sense to make it a permanent replacement.
Does my analysis make sense with the symptoms presented?
Edit- It just occurred to me that I should set the static IP in NUC1 to 192.168.1.57 before making the backup. This way the configuration files will be pointing to the right IP before and after.
You might try a simple ping: ‘ping 192.168.1.54’ and if that works you can ping the port: ‘telnet 192.168.1.54 8193’. if telnet connects, it will return some escape characters because it it expecting to connect to a telnet server.
Your reasoning is correct. Although I wouldn’t make any changes.
Primary use of backup will be to restore from failure and I that case you want to change as LITTLE AS POSSIBLE.
Go back to your original backup and restore it again. Using new revised plan.
Take old off network pull new on network and use whatever IP tricks you used (i use a reservation myself) to give new box old ip address. See if everything comes up ok. If not figure out why. Repeat until good.
Welcome to your first Disaster Recovery (Dr) exercise. Get good at it and then you can upgrade your HA install with impunity knowing you always have a way out.
You mean like making NUC1 a static IP before backing up? I don’t see a problem there because when restoring the backup on NUC2, it will inherit the IP of NUC1.
I’ve used backup/restore dozens of times always to save my bacon from messed up experiments. But it was always to the same host. This is the first time I tried going to a new host.
You can if you want. My point is don’t change your behavior for this instance.
The ONLY item you missed in your original process was to not change over the IP address.
If you go static that’s fine too but it brings it’s own problems to the table (like if you accidentally forget to pull off the old box. Colissions. I like the reservation change because depending on how you’re managing IPs it becomes self correcting.)
So just add the 'I have to make sure the IP reservation is still valid) step in your restore process and repeat. Done. No changes to behavior therefore fewer accidents…)
I do prefer IP reservations myself. I can easily change the reservation for NUC2 in the router after removing NUC1- in that case it should work after that minor change.