I would like to set up rsync to run on two machines.
Machine A rsync to Machine B
Machine B rsync to Machine A
Would there be any risk of running rsync in two machines at the same time, synching the same files?
If you're very careful you can do it:
Ensure that you use --times
so that the time stamps always match, and --update
so that it will not overwrite newer versions.
Use --temp-dir
with a directory outside the synced tree so that rsync does not find any temp files during its scan. The temporary directory should be on the same file-system as the destination, however, or else atomic moves won't be possible.
Do not use --inplace
, any variant of --delete
, or --checksum
.
Even then, I would always do it first one way, and then the other, or use a tool like SyncThing.