Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

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 [email protected]:~/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


Sign In or Register to comment.

Learn how to install a web and database server, email, FTP client or other applications. Discover and share information on server security or optimization recommendations.
Feel free to join our constantly expanding community, participate in discussions, strengthen your knowledge on Linux and Windows server management!
© 2013 - 2022 Time4VPS. All rights reserved.

Get In Touch