You are not logged in.

#1 2023-12-18 15:23:55

sweetthdevil
Member
Registered: 2009-10-20
Posts: 415

Synchronising three folders from three Arch Computer

Hello all,

I am playing a bit of supertuxkart with my two kids (all three computer running archlinux) and I was looking at a way to make sure the ad-dons folders remain synchronised over ssh - so that any added maps will be available on all machines.

I have a user setup on all three machines, so I would imagine the best way would be to give my users w/r access to the folder as well. Would rsync be the best options? I don't want to a have master folder as any one of us could add a map.

Thanks

Offline

#2 2023-12-18 16:26:18

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,335
Website

Re: Synchronising three folders from three Arch Computer

Are the maps versioned, and if so, does the filename / path change between versions?  In other words, is there any risk of the same file name on multiple machines containing different data?

If each file would be unique, then it should be quite simple: whenever something is added (or just periodically on whatever schedule you'd like) copy everything in the relevant directory to the other machines.  It wouldn't matter if it already existed there as it'd be overwritten with the same content (if the above-listed condition was met).  So scp could even suffice, though rsync would prevent having to send content that was already on the other machine ... though the cost of this is pretty small on the same local network.

If the same file name on different systems could contain different data, it becomes a bit more complex: but you'd just have to decide / plan how conflicts should be resolved: the newest or most recent file mtime taking precedence would likely be best.  This would then pretty much require rsync which can handle this well with the correct flags.

As another alternative, you could mount a shared network filesystem on all three systems at the relevant mount point, that way whenever one system writes anything to that directory, it'd appear automagically for the others.  There could be a potential issue, however, if the game modifies these files in any way ... especially if the game was running on more than one machine at once.

Last edited by Trilby (2023-12-18 16:30:29)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2023-12-18 17:41:48

raggerv8
Member
From: Sweden
Registered: 2010-07-01
Posts: 110
Website

Re: Synchronising three folders from three Arch Computer

My first idea would be to set up Syncthing to sync the add-on folders between the computers.


Brottweiler@#archlinux

Offline

Board footer

Powered by FluxBB