please help in rsync

Dear all,
I m trying to rsync a file remotely but it is throwing following error.

#/opt/sfw/bin/rsync -v -a -e ssh user@xx.xx.xx.xx:/export/home/naresh/utils.sh

bash: rsync: command not found
rsync: connection unexpectedly closed (0 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(150)

Please help me

Thanks & Regards
Naree

Hi,

I believe you need to configure /etc/rsyncd.conf and try telnet to localhost on 873 and see if it gets connected also add that in /etc/services. I used this link for help

Manpage of arsynca

Thanks.

Dear J,
Please help me how to add rsync entry in /etc/services. and /etc/rsyncd.conf what shud enter in this file please help me.

I have telnet to local host and port no 873 is showing following error

Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
Trying ::1...
telnet: Unable to connect to remote host: Network is unreachable

Thanks & Regards

Naree

In /etc/services
# Rsync port
rsync 873/tcp

In /etc/inetd.conf
#Rsync Daemon
rsync stream tcp nowait root /[location]/rsync rsync --daemon

In /etc/rsyncd.conf
[label name]
comment="test folder"
path=/var/tmp/test
max connections=2
log file=/var/adm/rsyncserverlog
uid=0
max verbosity=3
hosts allow=remote server

The same should be done on the destination in rsyncd.conf and make sure its running rsync too.

Thanks.

Dear Jartan,
As u suggested we have done entries in /etc/services. And in /etc/inetd.conf and checked whelther rsync is running and we noticed that it is running in both machines. And telnet localhost 873, it was able to telnet. Now we have given entires in /etc/rsyncd.conf as following

[label name]
comment="test folder"
path=/var/tmp/test
max connections=2
log file=/var/adm/rsyncserverlog
uid=0
max verbosity=3
hosts allow=xx.xx.xx.xx

And trying run rsync utility as

#/opt/sfw/bin/rsync -v -a -e ssh user@xx.xx.xx.xx:/export/home/naresh/utils.sh utils.sh

But our Bad luck it is throwing same error

bash: rsync: command not found
rsync: connection unexpectedly closed (0 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(165)

Please help us in this Regard it is really urgent.

Thanks & Regards
Naree

Do you need the --rsync-path=PATH in the command line? It appears that it cant see rsync on the remote machine.

Hi,

Did you gave the actual path where rsync resides in here
In /etc/inetd.conf
#Rsync Daemon
rsync stream tcp nowait root /[location]/rsync rsync --daemon
Also make sure the file is executable and permissions are ok.

Dear Jartan,
I have checked entry in /etc/inetd.conf the entry is correct as u have told us. But even though it is throwing same Error. what would be the problem. Please Kndly help me

Thanks & Regards
Naree

Hi Naree,

I think thats your only problem with you command is that the other machine haven't the rsync instaled or in the user PATH that you are using. Try to execute the rsync command from the machine that you want sync a file remotely.

Att,

Henter

first - i thought /etc/inetd.conf was no longer used (sol10). inetadm is supposed to be used.

second - if using anything other then solaris 10, maybe this will help clear this up:

bash-3.00$ which rsync
/usr/bin/rsync

now i edit /etc/services

...
#Rsync Daemon
rsync stream tcp nowait root /usr/bin/rsync rsync --daemon
...

Please first check rsync command exists at the location from where you running command.