Windows rsync that supports long file names, or an good alternative?

I may be missing the point but have you considered using Robocopy on Windows. It is similar to RSync however you can't schedule it from the application directly.

This can be overcome by writing a batch file for the copy and then creating a Scheduled Task. Robocopy is free and extremely robust. I often use it to copy files between Linux and Windows using Samba and the network, and the resume capability of Robocopy is really powerful.


Aha! You can use subst with rsync.

If you have a deep directory tree d:\very\long\file\n\ame\etc\etc then experiment reveals that you can subst X: to d:\very\long\file\name\etc and then rsync to and from /cygdrive/x/whatever. This works both at the client end and at the server end.

Now while you can use strategic substs to reduce the length of the filenames I don't know if this allows you to bypass the 260 character limit. It may also not be very convenient. Worth a try though.

John Rennie.

----8<----

See http://www.ratsauce.co.uk/notablog/LongFilenames.asp for my ramblings on long filenames.

I don't know of any way to get the \\?\ prefix to Cygwin, and obviously the current version of Cygwin doesn't use the prefix internally. Presumably they are addressing this in the new version and that's why it will support names longer than 260 characters. I use the Cygwin rsync all over the place so like you I eagerly await the release.

There are some other issues with the Cygwin rsync. It makes a mess of ACLs unless you specify cygwin=nontsec, and it tends to hang on very big directories. On my list of things to do before I die is to write a native Windows version of rsync that won't have these problems. I believe this has been done, but only as commercial versions not public domain ones.

JR


I would suggest you try Unison http://www.cis.upenn.edu/~bcpierce/unison/

It is a very interesting alternative to rsync because it can also provides bi-directionnal synchronization (which rsync is not able to do). I have already used it successfully across 2 virtual machines and was very happy with the results.

But as far as long filename are concerned I don't know if it works as you want.

From the official website :

Unison is a file-synchronization tool for Unix and Windows. It allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other.


Just a note that I run into the same problem (limitations of pre-1.7 cygwin) and found a working build of cwrsync with cygwin 1.7 here:

http://www.doering-thomas.de/page.php?seite=1&sub=6&lang=en#rsync

(Original link found from cwrsync forums)

Not exactly an official build, but it solved my charset issues :)