Fallback server

Dear HA users,

I have been searching for a way to make a “backup server” or “fallback server” but didn’t find an answer yet. The idea is in case of power failure a backup system will take over the main server. And a UPC isn’t really a option because it mostly creates a short time to keep a system up in a case of a RPi with a powerbank you have much more time left and a much cheaper solution.

Any idea’s?

You’d have a second device with mirrored backup of HA
That’s easy

You’d need to have some method for changing to that server when fail. Assuming Nginx, this is built in feature but unless it’s a separate server likely nginx is down when ha is down. If not, you can failover your secondary when primary not respond to request. Be aware that things like Zwave cannot work in this scenario since I don’t think this can be mirrored but HA will ignore this and start.

All this said, what catastrophe you expect that take down HA and what. Services are required at that time and for how long? I considered this for a while but realized a backup was all I required and manual was best fallback.

I don’t think I understand the problem.

How often, and for how long, do you anticipate power outages?

What functionality would you want to continue un-interrupted during an extended outage?

Most people use HA to monitor and control other systems. Those systems often need power. Likewise, if you’re remotely monitoring, you need an internet connection.

What hardware are you running which wouldn’t work with a typical UPS? Even an old-school desktop computer can run for a long time on a decent UPS.

It happens often when there is a blackout of the electricity token is expired. And a good UPS is expensive. I’m not talking from a first world country :wink:.

OK, never mind why.

The problem with a backup HA server is the same as the problem with a HA test server. I’d love to be able to load new HA versions in a test environment before upgrading my active system. But that would mean duplicating a lot of hardware. Much as I’d like that, I can’t really justify the cost or effort.

In your situation, I’d start by deciding what devices need to be available while the power is out. Build out a “critical system” environment, using the fewest devices, with the lowest power demands possible. You don’t need a fancy UPS. Some golf cart batteries and a automobile battery charger would work. Add solar panels if you really want to stretch your run time.

I will add that my HA system has been happily hosted on a Raspberry Pi 3B+ for over two years now. Unless you’re streaming audio or video through it, or doing voice or image recognition or other AI-type stuff, that may be all you need.

How does backup server solve electrical problem?

Backup server solve HDD or hardware failures.

How much more does it cost compared to purchasing a second host machine?

If you already own the second system and it has a battery-backup, why not use it as the primary system?

My test HA is an ancient pi 1B that otherwise would be gathering dust.

What do you do about all the hardware devices it talks to? I have several different brands of WiFi plugs and switches, plus a growing Zigbee network (which requires a Zigbee USB controller) plus some things connected to GPIO pins. I’d have a hard time putting together a representative test environment. As an example, the latest update breaks my Honeywell integration. I don’t think their cloud API would allow me to connect from two different HA integrations, but if I could it would force me to poll half as often to avoid rate-limiting.

99% of my hardware talks to mqtt (tasmota, zigbee, esprflink, openmqttgateway) Since my mqtt and zigbee2mqtt server are on a different server, it really does not matter.

Oh, and my esp32 cam running esphome does not have problems connecting to 2 ha servers at the same time.

1 Like