This is a guess: It might be that the time resolution is not large enough and the files are different while their timestamps fall into the same second and have the same length, so rsync can't distinguish them and skips them, thinking they are the same. The option --ignore-times
might help in this case, as that will force rsync to check the file content, not just file size and timestamp.
Another alternative to --ignore-times
is --checksum
, which will force rsync to checksum each file and should guarantee you that the directories are exactly equal afterwards, it will however slow things down a bit, especially on large file hierarchies.
Another more mundane issue could simply be failing hardware, RAM, harddrive or whatever that leads to files being copied incorrectly, I have seen that happen quite a few times. To check for that use a memory checker like memtest86+
and do repeated copies of the same directory structure to a different target directory and compare the results, if the results are different each time, something is fishy.
Have you tried SyncToy instead ?http://www.microsoft.com/downloads/details.aspx?familyid=C26EFA36-98E0-4EE9-A7C5-98D0592D8C52&displaylang=en
– ukanth – 2010-05-10T08:41:56.757Thanks mate it looks promising <br> Does it use the rsync Algorithm or something like it to save bandwidth – modi – 2010-05-10T08:54:31.070
i think i remember that the "rsync algorithm" (where it compares-and-only-copies-differences) only works on remote transfers -- ie, using "dir1/ dir2/" won't use the difference detection, it'll just copy files that don't already exist in the destination directory. you might use
-W
to make sure (that's capital W, or--whole-file
, for copy-whole-files). i'll let an rsync expert chime in with some real knowledge; i don't recall the limitation that well. you might be getting bitten by a cygwin-specific behavior. – quack quixote – 2010-05-10T09:59:31.330