Rsync on Windows sanity

While I was trying to synchronize a music library between the Linux host and a Windows machine by using rsync (cwRsync, to be exact), I realized that most of of the directory and file names were scrambled, or displayed long strings of question mark characters. There is a --iconv flag to rsync I though of using so I started to search the Web for the details. Some mailing list from a year ago suggested using a Unicode-aware version of the Cygwin DLL. The site seems to be up-to-date with the current Cygwin thus I downloaded the new library and moved it to the cwRsync bin directory. It works! You can download the patched Cygwin library here.

Now the remaining problems are synchronizing files and directories with characters that the archaic Windows shell does not accept and Cygwin still doesn’t process directories with more than 260 characters…

Edit: The limitation of 260 characters exists because Cygwin attempts to support the old non Unicode-aware versions of Windows. One day this may change. Also, there is a branch in rsync code that would allow the characters in the file names to be translated. A patched binary of rsync is available on the receiver side, but I don’t have enough motivation to build a patched version on the Linux server side right now. Shame on Windows for bad POSIX support…

Go Top