On Fri, Jun 01, 2001 at 08:44:18AM -0500, Dave Dykstra wrote:
> On Thu, May 31, 2001 at 03:29:42PM -0700, Adam McKenna wrote:
> > The Problem:
> > 
> > Since the script runs once a minute, it is possible for the rsync to start
> > while a file is still being transferred to us.  What appears to happen at
> > this time, is that something happens and the file doesn't finish transferring
> > properly.
> > 
> > So, is there any way to have rsync skip certain files, if they are not
> > complete?  There doesn't appear to be any obvious way to do this.  Could
> > the rsync process be the reason that these transfers are not finishing 
> > correctly?
> 
> There is really no way around that problem with rsync.  Many other people
> have tried to do similar things and the wisdom on the mailing list has
> always been that rsync via cron is the wrong tool for applications that
> have data that changes frequently and needs to be replicated very soon
> after it changes. You need something more like a distributed database or a
> replicating filesystem, or at the very least call rsync in a synchronous
> manner right after a file has been changed and before the file can change
> again.

This is possible if rsync had an option to *lock* a file before trying
to transfer. You would need sftp to lock the file as it was receiving.
With this, rsync could skip over the "locked" files and a rerun later
would retry them. Having rsync do locking would impact performance but
it has advantages (on the client and server).

-- 
albert chin ([EMAIL PROTECTED])

Reply via email to