0

I have servers that do things for me at home, for instance they keep copies of my bookmarks in the way that del.icio.us used to (nextCloud) and keep copies of my code (gitea).

Initially I thought that connecting back to them at my house was the correct way to go about it, but some places (aka network connections) frown upon this and also it's always better to have an additional place where things are stored.

So I thought a better way to go about this would be to sync the applications using master-to-master replication (using two mariadb instances), but the applications in question have the additional overhead of need their files synced in the same way as well since they don't only write to the database they also write to the file system.

I've found tutorials on master to master replication, so I'm unconcerned about that, but I don't really understand how the rsync file syncing can work as well and I don't want to manually do any syncing, if a laptop is connected to the correct network it should just happen as a background process (which sounds like it work work for MariaDB) but I don't know how it would work for rsync and of course somewhere in there you'd have to exclude things like configuration files as they aren't going to be the same on both servers.

leeand00
  • 4,869
  • 15
  • 69
  • 110
  • Use VPN to securely work at the office, but from home. – Rick James Nov 22 '20 at 20:50
  • @RickJames I wish, now more than ever, I wish, but that's not how it works for me, I work from the office. – leeand00 Nov 22 '20 at 21:09
  • Put them in a cloud? M-M needs connectivity in both directions. – Rick James Nov 22 '20 at 21:18
  • @RickJames oh so it doesn’t work like the m-s replication where you can take the s off and then put it back on to pull the rest of the changes? Instead it always has to be connected with no changes made on either end at all? – leeand00 Nov 22 '20 at 21:35
  • M-M is Primary-Replica in both direcctions. If the network is down, the changes (on either side) will pile up in the "binlog". Once the connection is reestablished, the updates will flow quickly to the other machine. – Rick James Nov 22 '20 at 22:52
  • @RickJames Well that would work fine, it’s only me using both databases. – leeand00 Nov 22 '20 at 23:05
  • `unison` for the files – roaima Dec 01 '20 at 10:59

0 Answers0