rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6]
Recently I have been unable to rsync over ssh. Each time I get the same error
bash: rsync: command not found
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6]
I am running
sudo rsync -av /var/www/html/somedir/ [email protected]:Users/myuser/Desktop/ec2backup
Please note the username, IP, and directories have been changed for the purposes of this post.
In the past I have ran the exact same command as verified using bash_history.
What I have tried:
- Ran a similar command from another server, resulting in the same error message.
- Tested rsync locally (local dir to local dir), which worked perfectly.
The only thing that has changed is I've recently installed Virtualbox and Vagrant. Is it possible I may have messed up authentication/ports/etc on my local machine?
Any help is greatly appreciated.
rsync is not installed on 999.999.99.9
my problem was that I was using cwrsync_6.2.1_x64 in conjunction with SSH_for_Windows_7.7p1, LibreSSL 2.6.5 that was preinstalled in win10 2004 build 19041.685.
in your rsync command, you need to point to the ssh.exe that comes with that specific rsync build. For example:
rsync -avHz -e "path_to\cwrsync_6.2.1_x64_free\bin\ssh.exe" --partial ...
I got this error error when the target directory didn't pre-exist. With a source data file: /a/b/c/d/data, rsync -av -e ssh /a/b/c/d/ hostname:/a/b/c/d needs the target directory: hostname:/a/b/c to pre-exist.
In reading the man page as a last resort I see that this is the intended behavior.