Install rsync for transferring files


Use any one of the following commands to install rsync. If you are using Debian or Ubuntu Linux, type the following command:

apt-get install rsync

RHEL / CentOS 5.x or newer user type the following command:

yum install rsync -y

Since rsync does not provide any security while transferring data it is recommended that you use rsync over ssh session. This allows a secure remote connection.

Example of commands

Copy file from a remote server to a local computer:

rsync -v -e ssh root@server.server.tld:~/file.html /tmp

Synchronize a local directory with a remote directory:

rsync -r -a -v -e "ssh -l root" --delete /local/folder server.server.tld:/folder

Synchronize a remote directory with a local directory:

rsync -r -a -v -e "ssh -l root" --delete server.server.tld:/folder/ /local/folder

Synchronize a local directory with a remote rsync server or vise-versa:

rsync -r -a -v --delete rsync://sync.server.server.tld/folder /home/folder

Mirror a directory between my "old" and "new" web server/ftp:

rsync -zavrR --delete --links --rsh="ssh -l root" my.old.server.tld:/home/folder /home/folder 

Was this answer helpful?

 Print this Article

Also Read

Execute cPanel scripts from SSH

Here are the scripts provided by cPanel that you can use to automate, configure, fix some issues...

Install Webmin

Installing on Debian Simply run command:wget...

Install OpenVPN AS

To install OpenVPN AS software in CentOS / Debian operating systems, perform the steps below....

Install GNOME desktop environment and VNC server

This guide uses Ubuntu version 12.04 LTS so there may be extra steps for different versions....

Install cPanel/WHM

cPanel/WHM installation is easy and straightforward. Login to the client area; At the top menu...