Take the 2-minute tour ×

I'm using rsync(with Cygwin) to sync 2 local folders. The folders contains binary files.

I'm using the following command:

rsync.exe -av dir1/ dir2/

but the files in dir2 are only partially updated, there are few different files.

Does anybody know of a problem with rsync on Windows? Should I use some other flags?

share|improve this question
Have you tried SyncToy instead ?microsoft.com/downloads/… –  ukanth May 10 '10 at 8:41
Thanks mate it looks promising <br> Does it use the rsync Algorithm or something like it to save bandwidth –  modi May 10 '10 at 8:54
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 May 10 '10 at 9:59
add comment

2 Answers

up vote 3 down vote accepted

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.

share|improve this answer
use --checksum. –  mpez0 May 10 '10 at 12:18
Thanks mate i will check it. –  modi May 11 '10 at 10:48
add comment

Rsync is powerful and clever but you do need to understand exactly what you are asking it to do which means reading the whole manual three times. Your use of it looks simple but so do lots of things that aren't.

And yes, --whole-file is the default for local-local rsync.

share|improve this answer
add comment

Your Answer


