files deleted on server end during transfer (+my bug +patch suggestion)

Hans Eric Sandström hes at xinit.se
Thu Mar 25 10:51:23 GMT 2004


Ok, this is a late response but I was browsing thru the archives and found
this question on a problem that I have been pondering myself.

Answer: There is no problem if a file gets deleted during transfer since the
file is kept open on the sending side and it will disappear only after the
transfer is done and the file is closed. Well thats the UNIX semantics on open
files. I am not sure how a rsync client on windows handles this.

Reading your question i see that the files got deleted before transfer of that
particular file was started but after rsync had determined that the file was
to be syncronised.

My bug: This is what happens to me when a file gets deleted. like that:

send_files failed to open /var/spool/zorro01/user/cyrus/3420.: No such file or
directory
rsync error: some files could not be transferred (code 23) at main.c(1045)

The above happens when a user deletes a mail on the cyrus-imapd server when I
am taking a snapshot of the mail spool area. I know I should probably stop
cyrus during backup but I do this every 15 minutes to keep a spare backup mail
server in sync. There is probably better ways of doing backup on a cyrus-imapd
server but I have't had the time to figure that out yet. Anyone, feel free to
help me with suggestions/ideas.

Patch suggestion:

When rsync has determined which files are to be updated it should probably
open all of them. I know this means lots of open files on the sending side if
there are lots of updates but if will prevent rsync from beeing confused by
files disappering.

Ok the above might not be practical but something has to be done to close the
window where rsync gets confused by files disappering on the sending side.

Hans Eric

----- Original Message ----- 
From: <luke at littlelukey.com>
To: <rsync at lists.samba.org>
Sent: Monday, October 20, 2003 2:32 PM
Subject: files deleted on server end during transfer


> Does rsync handle cases where files have been deleted off of the rsync
> server side after the client starts downloading from the server? I did a
> test run using two windows machines and the client puked, giving me some
> kind of file protection error. What happened is the client received it's
> list, starts downloading, all is well. Well, on the server side the files
> were moved out (or deleted) by another process that runs on that box. When
> rsync got to downloading from the directory those files were stored in I
> got approximately 50 dialog boxes in windows (one for each file) with some
> kind of file protection error (sorry, don't remember the exact message).
> There are also some empty files on the server side that need to be
> there...could these be the culprit? Are there any command line switches to
> suppress these error messages? Any help would be appreciated!
>
>   --Luke Matthews
>
>
> -- 
> To unsubscribe or change options:
http://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
>



More information about the rsync mailing list