[TriLUG] copying files

Jeff Schornick jeff at schornick.org
Tue Jun 19 21:52:21 EDT 2012


On Tue, Jun 19, 2012 at 9:39 PM, Joseph Mack NA3T <jmack at wm7d.net> wrote:
> I haven't used rsync. So after the initial phase, both ends know the files
> at each end and when I add a new file at one end, rsync will notice and just
> handle it?

Not quite.

On each synchronization run, rsync creates a local list from the
source directory, while simultaneously creating the analogous list on
the remote end.  This means if you have 1000 files, you may be looking
at 1000 fstats on each end.  However, these checks are both done
locally on the corresponding machines.  As long as the target system's
local file I/O isn't significantly slower than the source machine's,
you shouldn't be introducing any additional delay.

After both lists have been generated, rsync uses a minimal amount of
network traffic to compare the lists and generate a final list of
which files need to be updated.  As expected, only those files are
sent over the network.

After the synchronization is complete, the generated lists get tossed
out as dirty laundry.  There is no long running daemon which attempts
to keep them up-to-date in realtime.  However, I imagine someone has
created a slick piece of code using inotify to do just that.

  - Jeff



More information about the TriLUG mailing list