LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   rsync command does not work (http://www.linuxquestions.org/questions/linux-newbie-8/rsync-command-does-not-work-4175419735/)

figure20012 08-01-2012 07:12 AM

rsync command does not work
 
rsync -avz /home/websites/ root@172.18.224.135::root/test/
rsync: failed to connect to 172.18.224.135: Connection timed out (110)
rsync error: error in socket IO (code 10) at clientserver.c(124) [sender=3.0.6]


Is the command correct?
please help i am new to linux

acid_kewpie 08-01-2012 07:16 AM

well that suggests you don't have an rsync server listening at the other end. Do you believe you have? These days it's more common to run rsync over SSH, removing the need for a formal rsync service listening at the other end, and getting a more secure encrypted connection with it.

figure20012 08-01-2012 07:19 AM

what command should i use then
please help i am new to linux

acid_kewpie 08-01-2012 07:21 AM

I can't tell you that, you need to already know what you actually want to achieve with your own systems and describe it effectively. We know nothing about the systems involved, you do.

figure20012 08-01-2012 07:22 AM

Quote:

Originally Posted by acid_kewpie (Post 4743064)
well that suggests you don't have an rsync server listening at the other end. Do you believe you have? These days it's more common to run rsync over SSH, removing the need for a formal rsync service listening at the other end, and getting a more secure encrypted connection with it.

what command can i use instead acid_kewpie.please help..

acid_kewpie 08-01-2012 07:25 AM

As I just said, I don't know, as I don't know what you want to achieve and what resources you have to work with. Do you have ssh access to the peer server? You can try just adding "-e ssh" to the command as per the manpage, but there are so many unknowns for us here...

figure20012 08-01-2012 07:25 AM

Quote:

Originally Posted by acid_kewpie (Post 4743071)
I can't tell you that, you need to already know what you actually want to achieve with your own systems and describe it effectively. We know nothing about the systems involved, you do.

i need to copy a whole folder of websites to another server .the exact same thing with permissions and all subdirectories.i am trying to rsync the folder to the other serther using the command
rsync -avz /home/websites/ root@172.18.224.135::root/test/

rsync: failed to connect to 172.18.224.135: Connection timed out (110)
rsync error: error in socket IO (code 10) at clientserver.c(124) [sender=3.0.6]

but i get the following error
please help

acid_kewpie 08-01-2012 07:26 AM

I presumed that "::root/test/" was a typo... do you not mean ":/root/test/" ?

figure20012 08-01-2012 07:28 AM

Quote:

Originally Posted by acid_kewpie (Post 4743077)
I presumed that "::root/test/" was a typo... do you not mean ":/root/test/" ?

rsync -avz /home/sites_web/ root@172.18.224.135:/root/test/

i am getting the following errors
rsync: Failed to exec ssh: No such file or directory (2)
rsync error: error in IPC code (code 14) at pipe.c(84) [sender=3.0.6]
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]

please help

figure20012 08-01-2012 07:30 AM

rsync -avz /home/sites_web/ root@172.18.224.135:/root/test/

on the server 172.18.224.135 i have created the folder /root/test
but still i get the errors

acid_kewpie 08-01-2012 07:33 AM

well you've still not got an rsync server to connect to, so that's not surprising. Do you think you have one or not? If you do, fix it, if not, don't use rsync directly.

figure20012 08-01-2012 07:36 AM

Quote:

Originally Posted by acid_kewpie (Post 4743084)
well you've still not got an rsync server to connect to, so that's not surprising. Do you think you have one or not? If you do, fix it, if not, don't use rsync directly.

how to enable rsync on the server
i am using CentOS
please help

acid_kewpie 08-01-2012 07:43 AM

As above, we don't know what you're working with. also as above, you would generally do this over ssh, there are many many many guides online for using rsync over ssh if you have a search. Often it's just a case of adding "-e ssh" to the command though (also, as above)

figure20012 08-01-2012 07:48 AM

i got the solution thanks for helping
i had to install openssh-clients
for rsync to work


All times are GMT -5. The time now is 01:54 PM.