Hi all,
I have Home Assistant on a Raspberry Pi 3 in my house to manage all my stuff and everything works great, and it uses a more powerful Mariadb server located in my garage.
Everything is protected with a UPS except the network link between the house and garage which uses a couple of Netgear powerline adapters. So in case of power outage (which happens a lot lately), everything continues to work except the DB link. Yeah I could move the Mariadb server back to the Raspberry Pi, but it’s too slow. Or move thinks to the same place but that’s not the point.
I was wondering if I can use a failover solution to a local Mariadb server on the Raspberry Pi (master to master replication), until the power/main DB link comes back.
I know it’s a bit overkill but what the heck it’s an opportunity to learn something.
I saw the beginning of a solution with Mariadb Galera combined with HAProxy, but if some of you guys experimented other solutions (or same solution) your feedback would be very helpful.