Mark, Oren
2009-Aug-16 08:38 UTC
Rsync completed successfully, but files are not identical
Hi All, I came into a strange issue running rsync on directory with ~500,000 files. Some of the file, although with same time stamps and size on source and destination, were different on the destination. The destination is just a mirrored area, and the data written to it, is just the one that comes through rsync. Needless to mentioned, that when I remove files and synced them again it works, or when I did the sync with checksum. Due to the large number of files, running it with checksum is very bad options for me. I have few questions: 1) Any idea how come a replicated area, has files with same time stamp and size, but file is different than the source? 2) Is there a way for rsync to verify, that each transferred size is identical as the source, after the file was transferred? Thanks in advanced, Oren Mark --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.samba.org/pipermail/rsync/attachments/20090816/9629a826/attachment.html>
Matthias Schniedermeyer
2009-Aug-16 09:20 UTC
Rsync completed successfully, but files are not identical
On 16.08.2009 11:38, Mark, Oren wrote:> Hi All, > > I came into a strange issue running rsync on directory with ~500,000 files. > Some of the file, although with same time stamps and size on source and destination, were different on the destination. > The destination is just a mirrored area, and the data written to it, is just the one that comes through rsync. > Needless to mentioned, that when I remove files and synced them again it works, or when I did the sync with checksum. > > Due to the large number of files, running it with checksum is very bad options for me. > > I have few questions: > > 1) Any idea how come a replicated area, has files with same time stamp and size, but file is different than the source? > 2) Is there a way for rsync to verify, that each transferred size is identical as the source, after the file was transferred?My first question would be if i have a program on the source side that "tampers" with files and then resets the atime/mtime, as long as the size stays the same it's the same file for rsync. And i faintly remember reading about an issue with mtime and mmap writing files. I don't remember the details, but i guess if there was an issue it is remedied in recent kernels. IOW i'm quite sure the culprit isn't rsync. Bis denn -- Real Programmers consider "what you see is what you get" to be just as bad a concept in Text Editors as it is in women. No, the Real Programmer wants a "you asked for it, you got it" text editor -- complicated, cryptic, powerful, unforgiving, dangerous.