Installation configuration for the Rsync mirroring Synchronization tool

Source: Internet
Author: User
Tags file system log log file permissions rsync

The fundamentals of Rsync

Rsync uses the so-called "rsync algorithm" to synchronize files between local and remote two hosts, and this algorithm transmits only a different portion of two files, rather than sending it all at a time, so it's very fast.

The advantages of rsync

① can be mirrored to save the entire directory tree and file system;

② can be easy to maintain the original file permissions, time, soft and hard links;

③ without special permission can be installed;

④ optimized process, high file transfer efficiency;

⑤ can use rsh, ssh and other means to transfer files, of course, can also be connected through the direct socket;

⑥ Support for anonymous transmissions

Rsync Installation

Rsync Server 192.168.1.100

Rsync clinet 192.168.1.200

Yum install-y rsync adopts yum installation rsync

Getenforce See if the SELinux is turned on, if the value 1 indicates

Setenforce 0 shuts down SELinux and does not need to reboot the server

Restart Service:/etc/init.d/xinetd restart

Use Ps-ef |grep rsync to see if the Rsync service is open

Service-side configuration:

Rsync default configuration file does not exist, requires system administrator to create a new rsync configuration file

[Root@nagios SH] #vim/etc/rsyncd.conf

UID = Users who are backed up by www

GID = Groups that are backed up by www

User Chroot = no set to Yes must be detected with the root user, path specified directory

Max connections = 200 Maximum number of connections

Timeout = 600 Allow client connection time

PID file = location where/var/run/rsyncd.pid pid files are stored

Lock file = location where/var/run/rsyncd.lock lock files are stored

Log file = location where/var/log/rsyncd.log log files are stored

[WWW] Certified module name

path=/data/www/specify directories to participate in synchronization

Ignore errors can ignore some irrelevant IO errors

Read Only = no allows readable writable

List = no does not allow column listings

Hosts allow = 192.168.1.200 Specifies the IP address of the client synchronization

Hosts deny = *

Auth users = rsync designated authenticated user

Secrets file =/etc/rsyncd.password Certified password files

Chomd-r 777/data

Echo rsync:123456 >/etc/rsyncd.password

chmod 600/etc/rsyncd.password

Be sure to modify the/etc/xinetd.d/rsync

Disable=no

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.