Home > Code > using rsync to copy files from one server to another

using rsync to copy files from one server to another

August 17th, 2004 Tony Leave a comment Go to comments

if you need to move a lot of files such as moving your website to a new server, rsync via ssh is a super simple way to accomplish the task:

(execute on the new server)

rsync -av -e ssh username@oldserverhost:/home/old_home/ /home/new_home/

leave out the v parameter (verbose) if you do not wish to see the progress.

Categories: Code Tags:
  1. March 20th, 2007 at 05:26 | #1

    Just quick note thanks for the info saved me a lot of time.Just a quick note for others i change my ssh port from default to private port number so this HowTo works well if need to supply ssh -p [somePort] you need to enclose it in single or double quotes like so
    rsync -av -e ’ssh -p 65200′
    username@oldserverhost:/home/old_home/ /home/new_home/

  2. Chris Blake
    November 24th, 2007 at 08:46 | #2

    Thank you so much, you saved me loads of time with this information!

    Thank you again

    - Chris

  3. Varinder
    February 7th, 2009 at 06:14 | #3

    Dear All
    (A Novice here )I have a problem , i have a websserver running on RH7 and i want to mirror the website to a server on Red hat 9. What precautions should i take for rsyncing between these two diff versions of linux.
    Thanks in advance