<p>Despite primarily being a windows user, I am a huge fan of rsync.  Now, I don't want to argue the virtues of rsync vs any other tool...this is not my point.</p>

<p>The only way I've ever found of running rsync on windows is via a version that is built to run on top of Cygwin, and as Cygwin has issues with Unicode, so does rsync.</p>

<p>Is anyone familiar enough with the workings of rsync to say if there are any real technical programming hurdles to porting rsync to a native Win32 binary?  </p>

<p>Or is it maybe that there has just never been enough interest from windows users to care to port it over?</p>

<p>Partly I ask because I'm am considering trying to take on the task of starting a port, but I want to make sure there's not something I'm missing in terms of why it may not be possible.</p>

[{'answer_id': 34547, 'author': 'sig11', 'author_id': 3269, 'author_profile': 'https://Stackoverflow.com/users/3269', 'pm_score': 4, 'selected': True, 'text': '<p>The way that windows locks open files might cause an issue requiring you to hook into the Volume Shadowcopy Service.  </p>\n\n<p>About two years ago this fellow ported the algorithm to C#.  I haven\'t taken a look at the code (or the provided binary), but it might be a place to start looking or someone to try contacting.<br>\n<a href="http://www.russiantequila.com/wordpress/?p=8" rel="noreferrer">http://www.russiantequila.com/wordpress/?p=8</a></p>\n'}, {'answer_id': 34629, 'author': 'Will Dean', 'author_id': 987, 'author_profile': 'https://Stackoverflow.com/users/987', 'pm_score': 0, 'selected': False, 'text': '<p>Have you seen this:</p>\n\n<p><a href="http://www.itefix.no/i2/taxonomy/term/39" rel="nofollow noreferrer">http://www.itefix.no/i2/taxonomy/term/39</a></p>\n\n<p>I have used cwrsync without any problem (and with the much of the usual cygwin misery), but I haven\'t had any need for unicode filenames, so I\'ve not seen that problem.</p>\n\n<p>I don\'t really know why there isn\'t a native Win32 port, but I did look at the source a while back because I implemented a similar delta-copy system in C#.   As one would expect from the world of brilliant *nix hackers, the source is largely single-character variable names and a total absence of comments, which isn\'t terrible helpful and might be rather off-putting to would-be porters.</p>\n'}, {'answer_id': 143209, 'author': 'Michael Regan', 'author_id': 1027, 'author_profile': 'https://Stackoverflow.com/users/1027', 'pm_score': 1, 'selected': False, 'text': '<p>I\'ve been evaluating an effort to undertake a win32 port as well. I don\'t believe anything major would block it, but evidence from both the <a href="http://www.mail-archive.com/rsync@lists.samba.org/msg03824.html" rel="nofollow noreferrer">rsync mailing list</a> and another discussion points to a heavy reliance on unix fork() system calls. Using threads appears the way to go for win32.</p>\n\n<p><a href="http://archives.devshed.com/forums/networking-100/any-change-of-rsync-using-threads-instead-of-fork-1639456.html" rel="nofollow noreferrer">Threads vs. Fork discussion</a></p>\n'}, {'answer_id': 730583, 'author': 'kolosy', 'author_id': 70226, 'author_profile': 'https://Stackoverflow.com/users/70226', 'pm_score': 1, 'selected': False, 'text': '<p>(disclaimer: i promise, i don\'t google myself, but google analytics brought me here)</p>\n\n<p>i went through porting rsync to .net (sig11\'s link is my blog). there are no technical hurdles, just practical ones. as was already said, the code is rather... dense. difficult to follow, and complete lack of comments. i\'m more than happy to make my work available, but unfortunately, since it was part of a commercial effort, it\'s not in significantly better shape. </p>\n\n<p>i have, on a number of occasions, messed around with the idea of reverse-engineering the protocol and doing a ground-up implementation that\'s wire-compatible with the existing one, but ... a bit cleaner to work with. i\'ve even started a wiki to that effect, but... as you can see from the lack of contents there, other item have taken priority. if anyone would like to work with me on this, that may be the impetus i need to get going. </p>\n\n<p>the concept of the tool is great, as is the functionality it offers, however it\'s rather limited outside the *ix space, and could definitely benefit from an api.</p>\n\n<p>wiki link for reference:</p>\n\n<p><a href="http://www.russiantequila.com/wiki/index.php?title=Main_Page" rel="nofollow noreferrer">http://www.russiantequila.com/wiki/index.php?title=Main_Page</a></p>\n'}, {'answer_id': 2973908, 'author': 'Andrew Marlow', 'author_id': 358421, 'author_profile': 'https://Stackoverflow.com/users/358421', 'pm_score': 0, 'selected': False, 'text': '<p>I would really appreciate a port of rsync to MS-Windows such that it can be built using Visual Studio. I am encountering various protocol errors at random, somewhat intermittently. I am using rsync to distribute sw to a grid of around 200 machines and typically get around a a dozen failures. I am using GCC 4.4.2 and the latest cygwin to build rsync v3.0.7. It would help me alot if I could experiment with a version that does not require cygwin. This is because the machines in the grid already have another cygwin-based app running that is a different version to the one I have.</p>\n\n<p>Having spent some time on the rsynv mailing list opinion seems to be divided as to cause of protocol errors on MS-Windows. Some say it is a bug in rsync where it failed to do a clean socket shutdown, a bug that was fixed a while ago. Others say that it is a fundamental protocol error in rsync where the client does not tell the server that it is finished, it just shuts down, causing MW-windows servers to get a RST signal on the socket, something that does not happen on Unix.</p>\n'}]
['https://Stackoverflow.com/questions/34463', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/194/']