frame

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 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

Comments

  • JJussiJJussi Member
    Hi!
    -e "ssl -l root" parameter is not needed when you use "ssh syntax" with addresses. So we can change:
    rsync -v -e ssh root@server.server.tld:~/file.html /tmp   
    
    to:
    rsync -v root@server.server.tld:file.html /tmp
    (note that ~/ is missing too because : is pointing automatically to users home directory)

    Normally I use:
    rsync -aP root@server.server.tld:file.html /tmp
    so ownership, modification time and so on is preserved.
  • Antonyous99Antonyous99 Member
    edited February 2018
    Hi,

    Is anybody know how clone one linux TimeWeb server to another? Not so full but for installed LAMP only.
  • ReginaRegina Moderator
    edited April 2019
    Hey,

    We do not have a tutorial on how to clone your server from TimeWeb. However, you can first install LAMP on your server and then just copy the site's data to VPS. You can use a tutorial on how to install LAMP below:

    https://community.time4vps.com/discussion/55/for-ubuntu-debian-how-to-install-apache-mysql-php-lamp-stack/p1

Sign In or Register to comment.

Time4VPS

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 - 2024 Time4VPS. All rights reserved.

Get In Touch