LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-17-2011, 01:56 AM   #16
sneakyimp
Senior Member
 
Registered: Dec 2004
Posts: 1,055

Rep: Reputation: 78

As arizonagroovejet pointed out earlier today, the basic syntax (as described by the man pages) is:
Code:
rysnc source destination
Since your source server is the remote one, the SOURCE is going to be something like user@remotemachine.com:/full/path/to/file

Since your destination server is the local machine, the DESTINATION is going to be something like /full/path/to/local/file

The suggested options above vary and there are many suggestions and much detail (read the man pages, they do actually tell you something).

Something like this:
Code:
rsync -varzh --progress --delete user@remotemachine.com:/remote/file/path/public_html/ /local/file/path/public_html/
 
Old 02-17-2011, 02:36 AM   #17
ne0shell
LQ Newbie
 
Registered: May 2010
Posts: 22

Original Poster
Rep: Reputation: 0
Thanks for the help but I was able to get the answer from another forum.

The command I needed is:

rsync -avz user@1xx.xx.xxx.xx:/home/user/public_html /home/user/public_html/

Using the absolute paths was needed, something that isn't made clear in the man page or how to's I read.
 
Old 02-17-2011, 02:43 AM   #18
HellesAngel
Member
 
Registered: Jun 2007
Posts: 84

Rep: Reputation: 15
There are some useful examples of various rsync command lines here.
 
Old 02-17-2011, 11:44 AM   #19
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,237

Rep: Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653
Quote:
Originally Posted by ne0shell View Post
I need to copy the remote folder from path /home/user/public_html to my local server path /home/user/public_html using the ssh account user@domain.com for the remote machine. (I am logged in as root on the local server and do not have root on the remote server).
In that case its just the opposite of the previous examples:

Code:
rsync -varhz --progress --delete user@domain.com:/home/user/public_html/ /home/user/public_html/
 
Old 02-17-2011, 12:16 PM   #20
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,094

Rep: Reputation: 198Reputation: 198
Quote:
Originally Posted by szboardstretcher View Post
In that case its just the opposite of the previous examples:
Or, exactly the same as all the examples I provided which apparently the OP didn't understand despite my efforts to explain and the same as what sneakyimp said. Quite how the OP didn't get what they wanted from all that but then apparently managed to get the same thing we were telling him from another forum I don't know. But, whatever...
 
Old 02-17-2011, 02:14 PM   #21
ne0shell
LQ Newbie
 
Registered: May 2010
Posts: 22

Original Poster
Rep: Reputation: 0
The difference is -

1. Everyone kept stating the transfer as being the opposite of what it was and the command that worked is not the same as any of those posted as it uses the IP rather than the host.

rsync -avz user@1xx.xx.xxx.xx:/home/user/public_html /home/user/public_html/

Since I had already set up the domain to be moved my shell was resolving the domain as the local server and was just copying the local machine's empty public_html folder into itself and throwing errors.

I had to put the remote IP in rather than host name to finally get it to work. Also, most of the prior posts have been edited now w/ more info than was available yesterday.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync solaris + ld.so.1: rsync: fatal: libiconv.so.2: open failed: xxx_anuj_xxx Solaris / OpenSolaris 25 02-23-2012 04:23 AM
[SOLVED] rsync fails in cron - ssh key prob for rsync? jonathansfl Linux - Server 6 12-09-2010 10:48 AM
rsync problems, can you look at my command? - Rsync gurus. Spuddy Linux - Software 4 09-21-2010 11:25 AM
Could I run rsync to download files from a server without rsync daemon? Richard.Yang Linux - Software 1 09-18-2009 05:08 AM
Windows Rsync Upload to Linux Rsync - permissions inspleak Linux - Software 0 10-12-2004 03:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration