Using rsync: Configuring the Rsync Service

Source: Internet
Author: User
Tags address client clients configuration connect data data synchronization default

The previous section describes the contents of synchronizing and backing up using the rsync client command. Rsync can also be run as a daemon (daemon), and if a host runs rsync in daemon mode, it is generally called an rsync server. The mode of operation of the C/s mode of rsync is summarized as follows:

The Rsync client connects to the remote rsync daemon for data synchronization. Rsync server to open the RSYNCD service, the default listening to 873 ports, waiting for the client to connect. Rsync servers can be run independently or run by Xinetd. CentOS default to Xinetd run. The rsync server reads the configuration file when it is started, and the default is/etc/rsyncd.conf, which is similar in format to Samba's main configuration file. User authentication is the responsibility of the server, and user password files are indicated in/etc/rsyncd.conf.

The Rsync command is both a client program and a service program. Special command options are used when running the Rsync service, and common service options are:

Option Description –daemon represents a daemon run –address=address bind this service to a specified IP address run –port=port Specify a special listening port, default to 873 Port –bwlimit=kbps Limited I/O bandwidth (in KB ytes/seconds) –config=file Specify a configuration file, default to/etc/rsyncd.conf–sockopts=options specify custom TCP options -4,–http://www.aliyun.com/zixun/ Aggregation/6133.html ">ipv4 using Ipv4-6,–ipv6 IPv6

It lists only the options that Rsync uses for the service, and the options that Rsync uses for customers see the previous section.

To configure the rsync server

First select the server startup method for a heavier rsync server, you should use the standalone runtime for a lighter rsync server, you can create profiles using the XINETD runtime rsyncd.conf to create authentication password files for rsync servers that are not anonymously accessed

Running Rsync services with XINETD

CentOS runs the rsync service in xinetd mode by default. XINETD configuration file for rsync
In/etc/xinetd.d/rsync. To configure the Rsync service running with xinetd, you need to perform the following commands:

# chkconfig rsync on# service xinetd restart

The administrator can modify the/etc/xinetd.d/rsync configuration file to suit your needs. For example, you can modify the configuration line

Server_args =--daemon

Add the service options for rsync later.

Run rsync Services independently

The simplest way to run the Rsync service independently is to execute the following command:

/usr/bin/rsync--daemon

You can write the above command to the/etc/rc.local file to run the Rsync service each time you start the server. Of course, you can also write a script that starts the RYSNC service automatically when it is powered on.

Related Article

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.