What can I do for desaster strategy / backup strategy

Hi everyone,

as many of you probably as well, my home assistant hast “taken over” my house.
Meaning: If the installation is not running (for whatever reason) some of the features of my house will not be working properly.

I understand that there is no real “high availability mode” at the moment, which would be my preferred way, but I want to do anything that is possible to be prepared.

So a short description of my network is:

I am running Home Assitant in a VM on my unraid server. I backup the whole VM and I backup the home assistant instance regularly. So this is probably not a big problem. I can fire up a VM anywhere and restore the backup in less than an hour.

Then I have two raspberry Pi each with a sonoff Zigbee stick, running zigbee2mqtt. I need two because my zigbee network got really huge and one instance did not handle it anymore. So I split my house in two instances.

No here is my problem. If one of those rasperry pi goes out then half of my house does not work.
How can I backup these? How can I prepare for one of the sonoff sticks breaking?
I tried buying another stick and cloning the ID but did not achieve the possibility to just swap sticks an be back up running, when I tested it.

What can I prepare or do to make any downtime minimal (meaning that I in a best case) just switch out the hardware and then recover from a backup and am back up running.

I can’t be the only one with this problem, right?

Thanks

Acid

There was another post about this recently (although their system wasn’t nearly as complex):

So external drives all round, apparently :grinning_face_with_smiling_eyes:. The only thing I can suggest from my own experience, apart from backups, is to occasionally take a copy of the whole config folder. This means you can retrieve yaml very easily, just by copying and pasting.

Edit: I have gone to some trouble to make sure the house still works without HA. If I can only remember how… Wall switch? What’s a wall switch?

My plan includes designing such that a HA failure still leaves the house ‘functional’ meaning I still have basic manual control. Nothing is completely unavailable. (so I don’t get yelled at until it’s fixed)

I keep a spare Pi and M.2 drive ready. I backup my install nightly and can restore it in about an hour (after dropping off the he image and then kicking the restore.). I practice moving the install between the two pi about twice a year.

I do not keep spare sticks but could source what I’m looking for by mail within 48 hours. Mitigation is the design consideration above.

I myself also have the premise that most of the stuff should be working without HA. But to be honest - I did fall apart on that from time to time :wink:

So to be clear- My main concern is the zigbee networks because it would be a desaster to pair over 100 devices if a stick or raspberry fails.

Money is not really an issue so if I could go full cluster or whatever I would do that.

Zigbee2MQTT restores a back up of the coordinator on every restart. So restore for me there is plug in new replacement stick.

ZwjsUI can backup and restore a ZWave Coordinator. So that restore is instal new stick, restore NVM backup, restart zwavejsui twice.

With the other processes already backing up the relevant files my time to restore on a stick failure will be approx 48 hours. (I can use light switches for two days if necessary)

Should work, but only with CC2652 sticks, not with silab sticks

Done it many times before.

or use

to backup/restore

You are missing one very important issue: Power.

Note that most (if not all) of your devices are pretty useless when the power is off, but you want HA back on-line after the power returns.

Most power problems are short from fractions of a second to a couple of hours. Besides the possible total loss of power, you have to worry about VERY dirty power and the beginning and end of a outage. An abrupt power loss is very hard on operating systems and applications. A normal power supply is designed to deal with dirty power, but honestly many of the power supplies used with Pi are pretty bad.

I run HA on a x86 laptop that is plugged into a UPS. The laptop OS will do a soft shutdown when the battery is running low. I set the BIOS to auto-start when power is restored. I have two HA installations (1000mi apart), so one of them is always remote, so auto-start after power loss is needed.

You could plug your Pi into a UPS and that would be a big imporovement, But you still risk a power loss during an extended loss of power. A cheap UPS would power a Pi for many hours.

1 Like

Well my Home Assistant is running on a pretty big UPS.
But to be honest: If I don’t have power then most of my automations and zigbee devices are useless anyway.

So as I understand you all now I should:

setup my raspberry Pis with external drives, so that switching is easier.
I shoudl try again if I did anything wrong in changing the sticks on zigbee2mqtt and then I am pretty much good?