running two rsync processes, synchronizing the same directories

Matt McCutchen matt at
Wed Feb 27 22:25:07 GMT 2008

On Wed, 2008-02-27 at 22:29 +0100, cm wrote:
> What happens if two rsync process are running, synchronizing the same
> directories. In my case it means if two user are launching the rsync command
> at the same time to equalize the same files / directories.

Nothing terrible, but the two processes might waste time duplicating
each other's work.  You can avoid the situation using a daemon's "max
connections" or your own lock file mechanism.  See:

> How can I benefit from the -n Option (--dry-run) ? Am I right, when I say
> before you do a real rsync you can check  it with "-n". Does that mean, if
> a rsync with "-n" does function, the real rsync (without -n) should also
> work ?

It depends on what you mean.  If the dry run prints out the correct set
of actions to be performed on the destination, you know that the real
run will attempt to perform exactly those actions.  However, the actions
could fail in ways that rsync would not anticipate on a dry run, e.g.,
due to restrictive destination file permissions or lack of disk space.


More information about the rsync mailing list