1837920 Members
4585 Online
110124 Solutions
New Discussion

rsync problem

 
SOLVED
Go to solution
NiCK_76
Respected Contributor

rsync problem

I wanna copy some files from suse8.2 box to sles9 box by rsync,but it was not work,error message blow:
Connection timed out
rsync: connection unexpectedly closed (0 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(342)

how to solve it?
just for fun
10 REPLIES 10
Steven E. Protter
Exalted Contributor

Re: rsync problem

May I suggest openssh.

scp command.

Attaching a document that works very nicely for exchanging public keys enabling password free copying of files between Linux and/or HP-UX systems.

Ignore the X-Windows instructions, the cat command will do just fine as a substitute. Also, the instructions on directory permissions are critical.

openssh works well and is secure.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Vitaly Karasik_1
Honored Contributor

Re: rsync problem

1) does it work locally on sles9 ?
2) do you have DNS resolution between these hosts?
NiCK_76
Respected Contributor

Re: rsync problem

hi ,Steven E Protter ,thank you for your advice.
I used scp to transmit files before post the thread. SCP can't transmit some important information ,such as permission and owner .use rsync -og can do it.How can I?
just for fun
Paul Cross_1
Respected Contributor

Re: rsync problem

rsync needs rsh and .rhosts entries. This means the rsh and rsh-server need to be installed on respective machines and configured to allow rlogins.
Bojan Nemec
Honored Contributor

Re: rsync problem

Nick,

I use tar in combination with ssh. There are the examples:

To copy to remote

tar -c YOUR_FILES | ssh REMOTE "cd DIR; tar -xv"

To copy from remote

ssh REMOTE "cd DIR; tar -c YOUR_FILES" | tar -xv

The command is similar to create a tar, copy it to the remote node and extract files, but in this case the tar file is not created. You can omitt the cd DIR if the files resides on your login directory.

Bojan
James A. Donovan
Honored Contributor

Re: rsync problem

What is the exact command you are trying to run?
What is the version of rsync on each box?

There are known issues with specific versions. The latest, greatest version is 2.6.3 and can be downloaded from http://rsync.samba.org
Remember, wherever you go, there you are...
NiCK_76
Respected Contributor

Re: rsync problem

Thank you for everybody.
both box rsync version is 2.6.2 protocol version 28.
nick@www:~> rsync -avzog ppbase/ nick@221.137.12.115:/srv/rsync/ppbase/
Connection timed out
rsync: connection unexpectedly closed (0 bytes read so far)
rsync error: error in rsync protocol data stream (code 12) at io.c(342)

I'll install a new suse8.2 box to have a try .
just for fun
John Pretti
Advisor
Solution

Re: rsync problem

Have you tried utilizing rsync over ssh? You can accomplish this by a command similar to the following:

rsync /some/file -ave ssh servername:/some/other/dir

Please note you can pass any other rsync options as well. From the error indicated above, it appears that you do not have rsync installed on the target system.

Hope this helps,
John
NiCK_76
Respected Contributor

Re: rsync problem

hi John Pretti, thank you!
I can use rsync over ssh.It worked.

thank you for everyone!
just for fun
NiCK_76
Respected Contributor

Re: rsync problem

Solved
just for fun