Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Windows filer behind a corporate fire wall and a Linux-based filer in a cloud installation.

I've been attempting do an rsync-over-ssh-tunnel of files from the Windows filer to the Linux filer using rsync and ssh under Cygwin. I'm running in to issues with Windows and its case-insensitive NTFS.

I have apps running, using the Windows filer, that will alter the case of the files on the Windows filer when they access files. Example: will be changed to after an application reads the file. From a Windows application point of view this is okay behaviour: and are equivalent on a case-insensitive file system.

But from a sync'ing perspective this is causing me trouble. The rsync process doesn't see as a changed, but instead see's it as an entirely new file and I end up with and on the Linux-based filer after the rsync occurs.

Is there a better way to do an rsync-like synchronization of files on a Windows filer with files on a Linux filer that's as secure as the rsync-over-ssh approach but doesn't have the file case issues?

share|improve this question
What command are you using for rsync? If you use the right options rsync can delete the orphaned files. – Zoredache Sep 9 '10 at 18:45
NTFS is not case insensitive, the Windows API is by default, you can turn it off through a registry setting; however doing so may (will) break some (many) applications. Applications which rename files with different cases are poorly written; it's too common unfortunately. You're best options are probably to rename the files again (by some automated script) or to hardlink the files so it appears both ways on the Linux server. – Chris S Sep 9 '10 at 18:58
@Zoredache: it's the rysnc that comes with the latest Cygwin bundle. The orphaned file deletion is an option but it hurts rsync's usefulness since it should have been doing an incremental copy of – Ian C. Sep 9 '10 at 22:00
@Chris S: Yea, I don't want to turn off case insensitivity. As you can see I have some silly apps to deal with. I'm considering a force-everything-to-lower-case type script that runs before the rsync call. – Ian C. Sep 9 '10 at 22:01
up vote 1 down vote accepted

I don't think rsync can ignore case. Unison has an option for it (and of course it can use ssh for transport). I don't know if it's packaged for Cygwin; it can run natively on Windows.

share|improve this answer
Thanks Giles. Let me take a look at Unison. There was an rsync patch floating around that'll make it ignore case but it comes with its own problems (like a buffer overflow if you use logging while rsync'ing). An alternate tool that works over an ssh tunnel would be preferable. Unison could be it... – Ian C. Sep 9 '10 at 22:03
Sorry for the delay. I've tested Unison now and it is definitely doing a better job of handling things. Thanks for the tip! – Ian C. Sep 22 '10 at 15:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.