Configure Rsync server on Ubuntu VPS

Source: Internet
Author: User
Tags vps rsync ubuntu vps

Installing rsync


Perform the following command installation:


Apt-get install-y rsync


You can then use the following command to see which files are installed:


Dpkg-l rsync


Configuring Rsync


Modify the corresponding content in the configuration file/etc/default/rsync as:


Rsync_enable=true


Add the configuration file/etc/rsyncd.conf, as follows:

Port = 873

UID = root

GID = root

Use chroot = yes

Read Only = yes

Hosts allow=204.74.0.0/255.255.0.0

Hosts deny=*

Max connections = 5

Log file =/var/log/rsyncd.log

Log format =%t%a%m%f%b

Syslog facility = Local3

Timeout = 300

[Public]

Path =/home/pics/www

List=yes

Ignore errors

Auth users = Pics

Secrets file =/etc/rsyncd.secrets

Comment = Pics www


Create a file/etc/rsyncd.secrets content is a user name and password, such as:


Pics:mypassword


Then execute the following command:


chmod 700/etc/rsyncd.secrets


This is configured so that you can start the Rsync server by running the following command:


/etc/init.d/rsync restart


Rsync Client


The rsync command can be used on the client side, such as:


Rsync Rsync://[email Protected]/public

rsync--password-file=/etc/rsync.password rsync://[email protected]/public/home/pics/www--recursive--times--links --hard-links--delete-av


Configure Rsync server on Ubuntu VPS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.