I’d like to have a primary and failover backup local server config.
I was thinking of simply copying my xxxx@xxxx.com.Blynk,user files from one Blynk server to another and keeping them in sync if I make any changes over time.
Then in my sketch if I found one Blynk connection to be offline I would get the sketch to re-connect to other Blynk server and continue.
Personally I think this would work with no underlying issues (apart from history data being split).
Just wanted to confirm if you could you foresee any underlying issues with this setup ?
I see a small issue… the syncing. The server file is constantly being updated every second… I suppose you could have a timed script to copy across from main server to backup, but synchronizing or failing over? That is a whole next level task
Copy is fine. Also you may add DB to your local server and all data will be duplicated to DB also. And you can restore all from DB with “-restore” option when running jar file.
fair point - but i run a set of defaults and I can always write back to backup blynk server as long as I have a copy in my sketch local variables or SPIFFs of the key state variables that matter.
I just backup my entire Blynk folder (I use WinSCP)… then I can simply install Java and copy the folder onto another RPi for a fully operational cloned server.
Just use RSYNC. It should have no issues keeping two servers in sync. It’s actually made for this
You could add a loadbalancer in front of the Pi’s (or on the Pi’s). The loadbalancer will regulate your connection to what server. I don’t see any problems. It can even sync your historical data. There shouldn’t be more than a few seconds latency for the data syncing using rsync.
It’s a very good idea though. I’m gonna try this too!