We're using rsync to update the tables on our email relays, and very occasionally we get an error in the logs saying that a table has the wrong permissions. This is because of race conditions in finish_transfer() which mean that it does not update files atomically. This makes rsync not entirely safe to use in our situation, where the files being synced are frequently opened for short periods :-(
The specific problems are: (1) The permissions on the file are fixed as the last operation. They should be fixed before the file is atomically renamed into place. I believe this is the one we are hitting, which occurs about once every few thousand runs. (2) If the rename fails because it is cross-device, it is copied into place before the permissions are fixed. This should only occur if the user has specified a temporary directory. It is probably worth noting in the documentation that atomic updates are not possible in this situation. Fixing rsync to update the file atomically may cause problems if the target filesystem is short on space, which is probably the reason for using the --temp-dir option in the first place. Tony. -- f.a.n.finch <[EMAIL PROTECTED]> http://dotat.at/ BERWICK ON TWEED TO WHITBY: WEST OR SOUTHWEST 2 OR 3 INCREASING 3 OR 4. FAIR. GOOD. SLIGHT OR SMOOTH. -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
