0

I do the following command

 rsync -a toCopy/Read_Files/ toCopy/Test

and it works. However when I try through remote access :

 rsync -a toCopy/Read_Files/ root@192.168.155.148:/NightTest/

I got the following message

sh: 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(605) [sender=3.0.9]

Even though I followed instruction from this site

http://www.tecmint.com/rsync-local-remote-file-synchronization-commands/

section Copy a Directory from Local Server to a Remote Server

**See my answer to know what to do if you can't use rsync

Cher
  • 2,789
  • 10
  • 37
  • 64
  • it depends on your remote side. from the error msg, you can see it's a connection failure, which means rsync recognizes your parameters – Jason Hu Jun 09 '15 at 16:25
  • I do lots of scp before, after and they all work. how would it be possible? – Cher Jun 09 '15 at 16:26
  • want to try it, I read about it, but not sure, I add --rsync-path="path to rsync command" but then what is the path supposed to be? – Cher Jun 09 '15 at 16:42

1 Answers1

0

I solved the problem using scp command instead, turned out one of the server didn't have rsync.

See this solution for scp command

https://serverfault.com/questions/264595/can-scp-copy-directories

For rsync, this may be useful if you have similar errors that I have but you have rsync on BOTH machine

rsync'ing files between two remote servers, get errors stating rsync command not found on remote server

The error was indeed pointing out to the fact that the remote machine did not have it :

sh: rsync: command not found

This error was only occurring when doing it remotely, indicating that the remote machine was not able to find this command.

Community
  • 1
  • 1
Cher
  • 2,789
  • 10
  • 37
  • 64