--backup leaves window where file doesn't exist.

Dave Mielke dave at mielke.cc
Thu Sep 15 14:38:04 GMT 2005


[quoted lines by Dave Mielke on 2005/09/15 at 10:09 -0400]

>[quoted lines by Chris Shoemaker on 2005/09/15 at 09:59 -0400]
>
>>what about when backup-dir is not on same filesystem
>>as original?  link will give EXDEV, I think.
>
>Then, as I see it, rsync should go back to using rename but generate a warning.

I should, of course, have thought a bit more about my answer before presenting
it. The rename() system call itself doesn't support crossing a file system
boundary. What rsync does if the backup-dir is on a different file system is
copy the file over. In that case, therefore, it's already safe. The only
change, therefore, should be to replace the first rename() with link(). Since
both yield EXDEV, I doubt any more complex change is necessary.

-- 
Dave Mielke           | 2213 Fox Crescent | I believe that the Bible is the
Phone: 1-613-726-0014 | Ottawa, Ontario   | Word of God. Please contact me
EMail: dave at mielke.cc | Canada  K2A 1H7   | if you're concerned about Hell.
http://FamilyRadio.com/                   | http://Mielke.cc/bible/


More information about the rsync mailing list