I was using Cygwin rsync on our two Windows laptops to copy our files over from the old laptop to the new laptop. Invariably, the rsync would copy a handful of files and then hang. Restarting the rsync would copy a few more files and then hang again. Searching around on the Web, I found a lot of people complaining about Cygwin rsync hanging and not a ton of helpful information, but a few bits here and there that suggested that the problem was limited to using rsync over ssh and that rsync to a rsync daemon works better. Probably the most helpful page I came across was this page (which I actually found after I had fixed the problem, while looking for a good link for this post).
Well, I tried it and yes, running an rsync in daemon mode on the “server” completely solved the problem. You can set up an rsync daemon as a Windows service using a command like this:
cygrunsrv --install "rsyncd" --path /usr/bin/rsync --args "--daemon --no-detach"
--desc "Starts a rsync daemon for accepting incoming rsync connections"
--disp "Rsync Daemon" --type auto
You also need an rsyncd.conf file. I actually already had one because I had previously installed a modified Cygwin rsyncd package from the backuppc project. I did run into a problem with that though because the rsync.exe in that package conflicted with my installed Cygwin (cygwin1.dll versioning problems I suspect). So I ended up modifying the rsyncd.conf to use cygwin paths instead of Windows paths and then used the regular cygwin rsync.exe.
Interestingly, neither the rsync FAQ nor the Cygwin FAQ mention this problem.
Popularity: 11% [?]