prevent simultaneous copies?

jw schultz jw at pegasys.ws
Sat Sep 6 09:00:35 EST 2003


On Fri, Sep 05, 2003 at 04:45:00PM -0400, Bob Bagwill wrote:
> Would it be worthwhile to have an option to check for the presence of the 
> temporary dot file in the target directory and to warn the user that the 
> file is already being transfered?  Something like:  
> --skip-in-progress-files ?

There is (an can be) nothing rsync-specific about the
tempfile names so it would be prone to mistake another file
named the way rsync tempfiles are for an rsync tempfile.
That is why the names are semi-random.  Even if we came up
with a way to differentiate the rsync tempfile from another
file the semi-random tempfile names would require that such
a check to scan each file's parent directory for each file
synced and that would be a lot of added overhead.

I can't see doing that.

> We usually transfer files via a cron job, but sometimes impatient people 
> try to push stuff out, not knowing the file is already being copied, and 
> disk space and bandwidth is temporarily wasted. If they are copying big 
> files to a small filesystem, there's a danger that the two big temp files 
> may fill up the filesystem, preventing either from completing.

Sounds like a process issue.  You might want to either take
rsync away from the impatient or wrap it in something that
maintains and tests a single transfer lock file and can
either refuse or wait until the running transfer is
complete.

-- 
________________________________________________________________
	J.W. Schultz            Pegasystems Technologies
	email address:		jw at pegasys.ws

		Remember Cernan and Schmitt



More information about the rsync mailing list