Home Assistant - Active Passive HA solution

Hi all,
I’m planning to create an Active/Passive setup to with HA to reduce time of recovery in case of a hardware failure. My idea is to have an identical PI, powering up once in a week, updating to latest HA, restoring from the backup from the active HA, and shutting down again.
Is there a way to create an automation to:

  • restore from backup
  • update HA OS if update available
  • update HA
    Or maybe there is a better way to parodically sync several folders. I could also do rsync with some folder, but that will not keep the HA OS up to date…
    If there is anyone who did something similar?

This really does not sound like anything practical to do…

And how much you hope to reduce the time of recovery? Did also have a thought how to recover when you are not at home? Beside if your restored second device is 6 days old you probably want to restore a newer (the newest) backup anyways - so nothing won? :thinking:

If you in fear of a hardware failure you might instead have some UPS and more than one raspberry running with things like docker swarm so one can go up in smoke and your cluster will just continue to work… :whale:

I do sort of the same, but I do it on a hypervisor level. Two hypervisors, backup and replication.

The end goal would be automatic failover. If something is broken while I’m away it could correct itself.
I have implemented a similar approach for Zigbee. My Z2M installation has a backup PI, with a backup PoE antenna. I power all PIs via PoE which I can control via an API. Every week I turn on the PoE for the Z2M backup, copy the settings from the active one, and shut it down again.
In case of an issue, I just switch off the PoE for the active Z2M and the active Zigbee router, wait 30s, and turn on the backups. In less then 1 minute everything is up and running again.
If I could keep the backup HA PI up to date, the same solution would work with HA as well. If the monitors kick in, I’ll simply flip the PoE automatically, and transfer the IP.
In theory this would work, without additional HW

You use the hypervisor to replicate the active instance?

There are some good discussions in the forum. Search for “high availability”

Individuals trying to achieve this probably have higher/longer/more downtimes compared to people that just flash HaOS onto some flash and call it a day :person_shrugging:

No, I use Veeam to do the replication. It’s backed by two ESXi hosts.

Maybe. :slight_smile: But still an interesting challenge. ^^

Thank you, I started with that. Couldn’t really find anyone who did anything similar yet. But hey, if nothing else work, I’ll contribute to the HA development to get those features I need. :smiley:

Haha :joy:

And lots more (mostly abandoned) with a 30 seconds search :raised_hands: