How to use rsync to copy folders from dedicated server to local hard drive?

asked Mar 23, 2012 in Dedicated Hosting by SunFun (3,000 points)
Hi there,

I want to use rsync to copy some folders from my Dedicated server to a local hard drive, does anyone know how to do this?

I would really appreciate your advice,


1 Answer

0 like 0 dislike
answered Mar 23, 2012 by mike231 (2,480 points)
Hi sun,

You can use the following command to copy the content of your home folder on the server to a backup directory on your local computer:

rsync -e "ssh -p 18765" -aHz YOUR_SERVER_IP:/home/USERNAME/ /home/LOCAL_USER/BACKUP/
Change YOUR_SERVER_IP with the IP of your server, USERNAME with the cPanel username of the account you want to copy from, and LOCAL_USER/BACKUP with the path on your computer where you want the home folder to be copied.

hope this helps