for work I was supposed to set up a master-master replication of 2 servers ( raspberry pi 3 debian ), which I did and it works, but now I have come to the issue of why we set up the replicas in the 1srt place : Server 1 is the main master and server 2 is supposed to be a backup in case server 1 shuts down for X reason, and the clients would still have access to the database and continue writing on it.
But what happens when server 1 is repaired and restarted ? Will it sync automatically with server 2 ( which now has more infos, tables and so on ) of do I have to write commands to make it sync and get all the data it's missing ?
Knowing the database is about 20 000 000 of code lines and heavy, I cannot just do this manually and I need this to be automatic or a least make some sort of script that manages to sync all the data at once and not line per line..
I'm not at all a linux pro, I just started working on it last october so some concepts are quite blurry to me
Thanks for the help !