File Locking

Kyle Lanclos lanclos at ucolick.org
Mon Aug 18 16:52:37 GMT 2008


Another Kyle wrote:
> However, I want to schedule the script to run, say every 15 minutes.
> That way if a file is put on the source side, the cript will pick it up
> and begin copying it.  However, if the file is a few hundred MB, it might
> take longer than 15 minutes to copy it.
>  
> In other words, I can't wait until the first run has completed the large
> copy to begin copying additional files.

If you can't copy a large file within a fifteen minute time span, you've
implied that you are working over a low-bandwidth link; if that's the case,
why would you want to start another rsync that would compete with the already
running rsync for bandwidth? Two rsync processes running over a single slow
uplink are not going to be any faster than two rsync processes running in
series; if anything, the reverse is more likely to be true-- that two
or more (and, given what you've described, "more" sounds likely) rsync
processes running simultaneously are likely to be *slower* than running
rsync repeatedly in series.

This sounds more and more like my own situation, which again, I solved by
ensuring that only one rsync was running at any one time; I invoke the
wrapper script every sixty seconds, and it takes less than 20 seconds to
inspect the directory tree for changes and abort in the absence of files
that need to be transferred.

--Kyle


More information about the rsync mailing list