Rsync problem: command not found
I am trying to run a simple rsync job on RHES4 but keep getting a command not found error. The job is this:
rsync -r <my user>@<my server>:/home/myuser/ /batch/ This is the error message: bash: rsync: command not found rsync: connection unexpectedly closed (0 bytes received so far) [receiver] rsync error: error in rsync protocol data stream (code 12) at io.c(359) I have tried feeding it the rsync path with --rsync-path=/usr/bin/rsync but still not luck. Ideas? |
How about just placing the full path to the executable:
/usr/bin/rsync -r <my user>@<my server>:/home/myuser/ /batch/ And you might want to put /usr/bin in your users path, this is a common place for most executables you'll end up running anyways. I find it strange it's not already in your path, unless you don't have rsync installed. ;) |
that looks like rsync is not installed on the remote server. is it?
|
Quote:
|
I tried this but I get the same error:
/usr/bin/rsync -r <my user>@<my server>:/home/myuser/ /batch/ bash: rsync: command not found rsync: connection unexpectedly closed (0 bytes received so far) [receiver] rsync error: error in rsync protocol data stream (code 12) at io.c(359) Rsync is on my server: which rsync /usr/bin/rsync It is not on the remote server, but as trickykid stated, my understanding was that it did not need to be. |
Quote:
/usr/bin/rsync -r -e ssh <my user>@<my server>:/home/myuser/ /batch/ |
Hmmm. Same error. Maybe it does need to be installed on the remote server?
|
Quote:
|
Seems to be. This is going to Windowz over SSH so I was hoping that I could just use rsync to copy only new files over. Does SCP have an rsync-like option to only copy new files?
|
Wait, you're trying to go from Linux to Windows? SCP does not to my knowledge have rsync type capabilities and will overwrite existing files, etc.
|
Yes (unfortunately) Linux -> Windoze. I read some information on the Samba / rsync list that this was possible, if ssh was set up. Apparently not, however. Maybe rdiff will work.
|
Quote:
|
This looks like what you want:
http://www.captain.at/howto-rsync-linux-windows.php http://www.brentnorris.net/rsyncntdoc.html |
Just install cygwin on your windows box. Make sure the following are installed:
- All packages in admin - unzip/zip from archive - select vim in editors - in Net, select openssh client/server, then rsync - everything else default Once cygwin is finished, open the cygwin bash shell, and run: ssh-host-config Say yes to everything and follow instructions to start the service. Voila, you are all set. If you still get the same error, make sure you specify where rsync is remotely with the following option: --rsync-path=<path to rsync on windows box> Hope this helps. |
In my case I was trying to rsync from Mac OS to CentOS. rsync has to be installed on the remote box, but it is expected to be at /usr/sbin/rsync instead of /usr/bin/rsync. I just created a symlink on my remote machine:
ln -s /usr/bin/rsync /usr/sbin/rsync Now rsync works |
All times are GMT -5. The time now is 06:08 AM. |