what is the right exit code for some vanished files?
matt at mattmccutchen.net
Mon Dec 24 06:27:51 GMT 2007
On Sun, 2007-12-23 at 15:55 -0500, Ming Zhang wrote:
> if sender read by path again and get ENOENT, then this ENOENT can tell
> rsync enough info. (though current rsync might say partial transfer
> though it is a vanished file... )
Treating the file as completely vanished on the basis of the ENOENT and
discarding the fd would be another "correct" behavior, but I agree that
operating on the fd is cleaner. I believe the current rsync does give
partial transfer, which is not ideal.
> all file sync/backup software for a live file system can have same
> here. which state to maintain. rsync can always do a stat on the saved
> path again after the transfer, to detect the change, and then (with an
> option specified), put the path into a residual file list and
> them again. but maybe rsync does no need to go this far and a higher
> layer software base on rsync can do this...
Yes, such as the inotify+rsync setup you mentioned.
> Thanks a lot for all the explanation and wish you a happy holiday!
Thanks! My holiday has been very happy so far!
More information about the rsync