HA backup server in the event of hardware failure

HA has been pretty much rock solid for me . I have it running on a modern Nuc . I’ve had a few nucs in the past and reliability hasn’t been that great I.e keeping it working , not crash / power off randomly. I know there are many issues why this could happen .
I was considering a 2nd pc as a backup . I.e install backup ha from main pc - transfer zigbee usb stick over . Is it that simple ? . I require another system to be up and running quickly assuming original NUC dies a definitive death !
What do others do / suggest ?

1 Like

Its pretty much as simple as installing fresh on a new machine, restoring the backup and swapping any usb stuff over. The biggest issues will be if the IP address changes. Stuff like MQTT will need this address. But then you can probably set the IP address to be the same. I have an old PC that I have used for this in the past for testing purposes.

1 Like

Great

Think I’ll do exactly that .
Get ‘standby ‘ pc configured with same ip address . Shutdown real ha server . Swap usb , install backup - see what happens.
Best to test before really needed !

For a software crash, installing HA OS on top or proxmox (with a regular proxmox backup) will work in most scenarios.

For a hardware crash, even something basic like a backup pi is good enough if you have a HA backup stored somewhere safe (as in, not on the thing that crashed in the first place).
Do remember though, if you’re using zigbee or zwave hub, a serial/by-id mapping will go a long way towards achieving a smooth handover on the off chance you might need to restore

1 Like

The good thing as well when using proxmox is you can easily restore a backup to the new machine and just cut and paste the mac address to keep the same IP. Not sure if when restoring to a new proxmox server that it keeps the same mac address so best take a copy of that.

When I was getting used to using proxmox I always had 2 containers for HA, one active and one for testing, both with the same MAC. You can then swap easily between the 2 without fear of killing one.

Hello,
I plan to install HA on a backup RPi in case the current RPi server crashes. I understand giving the same IP address is a good idea.
I have also a lot of Zigbee devices with a Skyconnect coordinator. Still, I do not understand what you mean by: [quote=“ShadowFist, post:5, topic:688324”]
Do remember though, if you’re using zigbee or zwave hub, a serial/by-id mapping will go a long way towards achieving a smooth handover
[/quote]
Can someone expand a little on that?
By the way, is there somewhere a more comprehensive HaA-RPi crash preparedness ‘handbook’ available? This would be mighty heplpfull for a lot of people.
Thanks

Here you go, hope the below helps. If you’re still not sure, there’s loads of posts in this forum about it if you search for serial/by-id.

1 Like

Thank you. Following your suggestion, I spent several hours digging through posts related to serial/by-id, and I am now a few little steps further.
In the terminal, the command:
ls -l /dev/serial/by-id
gave the following result:

total 0
lrwxrwxrwx    1 root     root            13 May 27 23:48 usb-Nabu_Casa_SkyConnect_v1.0_b249b124a396ed11a1d9c998a7669f5d-if00-port0 -> ../../ttyUSB0

I’m still struggling to find out how I should put this info into the configuration.yaml.
A little help here would be welcome.

Here is a snippet from my zigbee2mqtt yaml if it helps

serial:
  serial:
    port: >-
      /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_26849e9b7f12ec11b7a021c7bd930c07-if00-port0
1 Like

OK, I added the snippet with the corresponding info of my sky-connect into my configuration.yaml, restarted HA and it functions still fine.
I will now proceed and begin to install my backup RPi.
Thanks for the help.

Although HA continues to work fine, I got this error message after restart:


The serial integration does not support configuration via YAML file. You may not notice any obvious issues with the integration, but any configuration settings defined in YAML are not actually applied.
To resolve this:
1. If you've not already done so, [set up the integration](http://homeassistant.local:8123/config/integrations/dashboard/add?domain=serial).
2. Remove `serial:` from your YAML configuration file.
3. Restart Home Assistant.

So I’m confused again…

Have you looked in conifguration.yaml for the word serial?

Just comment the section out and all should be well. Backup your setup before doing this as then if you get it wrong you can restore.

If you restart via the developer options menu it will allow you to check weather HA will restart or not before restarting, if there are issues it will tell you where they are.

Just thought this is probably due to you trying to add the serial setup for your dongle to the wrong file, maybe.

All my Zigbee devices were integrated with ZHA; I have not been using Zigbee2mqtt. If configuration.yaml is the wrong file, as suggested in the preceding post, I wonder where to drop the above-mentioned snippet.

You drop it in the Z2MQTT configuration yaml file, not the home assistant configuration yaml file.

I have no Zigbee2mqqt integration installed, since I have been using ZHA. Hence, there is no Zigbee2mqqt configuration.yaml.
Moreover, one cannot run Zigbee2mqqt alongside ZHA with the Skyconnect dongle. I tried to install Zigbee2mqqt alongside ZHA last week, and it locked me completely out of the system. Had to reinstall everything; luckily I had a good backup.

Ah sorry, misread that post when I replied earlier.

Indeed, you can’t. You can only run 1 zigbee integration per coordinator. If you want to try Z2M you will need to buy a separate coordinator, or else risk it by disabling ZHA.

On to your actual issue - You don’t need to do anything in yaml. Everything can be done in the GUI, but you’ll have to reconfigure your ZHA integration (so make sure you have a backup just in case).

From the ZHA docs:

In your case, you would enter /dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_b249b124a396ed11a1d9c998a7669f5d-if00-port0

Again, apologies for not sending the easier link which shows you how to easily get the ID you’re looking for by going to the All Hardware screen instead of having to mess around with terminal.
Hopefully everything’s much clearer now.

1 Like

Thank you, feels like I have again firm ground under the feet now. Although…
Reinstalling my (Sky)Connect dongle seems somewhat daunting to me. When I started the procedure, the first thing HA told me was that all my devices and entities would be lost (I have now dozens of Zigbee devices and hundreds of entities). I know that there is an automatic backup and restore for ZHA, but still, I am afraid to lock myself out if I do not manage to correctly reconfigure the dongle. So I decided to keep the valuable suggestions of this conversation in a safe place, but leave the configuration as it is now, and that is:

  1. I have a backup RPi ready to boot from a SSD;
  2. In HA, I have configured the RPi to have a fixed IP address;
  3. I have a regular backup routine including backups on Google drive;
  4. And I keep my fingers crossed that the Skyconnect coordinator will continue to work OK like it has been doing the last couple of years.

I have done the exercise of swapping the two RPi’s and this has been absolutely seamless.
In case the SSD would crash, getting a new one up and running and restore a backup will be easy too.
One last question: what if the Zigbee dongle crashes: will the swapping procedure as described in the ZHA documentation still work, i.e. will the Zigbee integration screens in HA still be accessible to run the procedure including the backup of the Zigbee configuration???

1 Like

I haven’t tried it personally, but this part of the docs seems to indicate that you can just reconfigure the new coordinator and upload the backup seamlessly.