Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 02-17-2011, 01:56 AM   #16
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:
rysnc source destination
Since your source server is the remote one, the SOURCE is going to be something like

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:
rsync -varzh --progress --delete /local/file/path/public_html/
Old 02-17-2011, 02:36 AM   #17
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 /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
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
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
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 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:

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

Rep: Reputation: 198Reputation: 198
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
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 /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.


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 + rsync: fatal: 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 > Forums > Linux Forums > Linux - Software

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

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