Linux – rsync hangs after a few transferred files (Bash for Windows to FreeBSD)

freebsdrsyncwindows-subsystem-for-linux

I'm using "Bash on Ubuntu on Windows", from a Windows 10 Pro PC, to backup my media library to a FreeBSD server that acts as my NAS (it runs NAS4Free). This used to work perfectly but it recently stopped to work. Since I haven't changed anything on my side I reckon the change came from one of of the Windows Updates, not sure.

In any case, here's what happens. Just after a few files got copied over, the rsync transfer just hangs. I've let it run overnight to confirm and it just hangs for hours. When I manually kill the task by sending CTRL + C to the terminal I get an error message, some time goes on (about 30 secs) and the program stops:

arnaud@CLAVAIN:~$ rsync -arv --delete --no-compress /mnt/e/Music/ arnaud@nas4free.lan:~/pool1/lolilol/music
arnaud@nas4free.lan's password:
sending incremental file list
ost/Luke Cage (Original Soundtrack Album)/
ost/Luke Cage (Original Soundtrack Album)/40. Finding Chico.m4a
ost/Luke Cage (Original Soundtrack Album)/41. I Am Carl Lucas.m4a
ost/Luke Cage (Original Soundtrack Album)/42. Crispus Attucks.m4a
ost/Luke Cage (Original Soundtrack Album)/43. Hideout.m4a
ost/Luke Cage (Original Soundtrack Album)/44. Cuban Coffee.m4a
ost/Luke Cage (Original Soundtrack Album)/45. Like a Brother.m4a
ost/Luke Cage (Original Soundtrack Album)/46. Cottonmouth's Clamp.m4a
ost/Luke Cage (Original Soundtrack Album)/47. Survival.m4a
ost/Luke Cage (Original Soundtrack Album)/48. Cottonmouth Theme.m4a
ost/Luke Cage (Original Soundtrack Album)/49. Luke Cops.m4a
ost/Luke Cage (Original Soundtrack Album)/50. Crushin' On Reva.m4a
ost/Luke Cage (Original Soundtrack Album)/51. Beloved Reva.m4a
^Crsync error: unexplained error (code 130) at rsync.c(632) [sender=3.1.0]
[sender] io timeout after 60 seconds -- exiting
arnaud@CLAVAIN:~$

You can see where the ^C is, that's when I send the kill message. This is when the "error: unexplained error" and "io timout" errors show up.

I have tried an alternate command, rsync -rltvzD --progress --delete, but that produces the same error.

Is there anyway I could troubleshoot this better to understand what the problem is? Note that if I do this on a local drive (like a USB external drive) the rsync works just fine.

Best Answer

I had this issue as well recently (as in yesterday), and what I found out, is that when I rsync without delta copy (using --whole-file/-W for whole file transfer), then everything works perfectly.

I know it is not the best solution, but a quick fix for now until it is patched.