I currently have a server that nightly backs up its data to a NETGEAR ReadyNAS device using Rsync. This has been working fine for the past few months. However recently, I started to get the following error:
rsync: writefd_unbuffered failed to write 4 bytes to socket [sender]: Connection reset by peer (104) inflate (token) returned -5 rsync error: error in rsync protocol data stream (code 12) at token.c(604) [receiver=3.0.6] rsync: connection unexpectedly closed (229743 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(601) [sender=3.0.7]
I've managed to track it down to one particular file that is causing the problem (by using Rsync to copy just that file). The file itself is quite large - about 975Mb. However, there are also other files in the same directory, some as large as 3Gb, and these backup fine.
I'm using the following Rsync command:
rsync -avz --password-file=/root/rsync.secret <sourcedir> username@readynas::backup
Rsyncing to an Ubuntu Linux host seems to work, so it doesn't look like there's a problem with the rsync client on the server.
I've Googled around but found nothing. A lot of people seem to be saying that adjusting the timeout at the Rsync server end solved similar problems, but if this were my problem I can't understand why it works with the larger files.
Does anyone have any suggestions how to solve this?