Rsync static file synchronization

Source: Internet
Author: User

Rsync static files Synchronize files on server A to server B and server C. The rsync server has the following settings: (rsync installation is omitted) Configure rsync on server A as follows: 1. Install the rsync service, check that the rsync command is ps-ef | grep rsync, And the rsync command is rsync -- daemon ., 2,/etc/rsyncd. the conf file is configured as follows: (rsync. manually create the conf file) uid = root gid = root use chroot = no max connections = 20 log file =/var/log/rsyncd. log # lock file =/var/run/rsync. lock syslog facility = local5 pid file =/var/run/rsyncd. pid [wwwroot] path = synchronous file path strength comment = wwwroot mapping jlWW WEB hosts allow = B, C Server IP 3: Start Service: rsync -- daemon check whether to start: ps-ef | grep rsync if the rsync -- daemon process appears, the startup is successful. 4: Configure on server B and server C: Create websync under root. sh EDIT: rsync-vzrtopg -- delete A server IP: Synchronize folder name synchronize folder to that path annotation: v is verbose, z is compressed, topg is the original property of the file (owner, time parameter ). -- Delete: if the server deletes this file, the corresponding file 5 will be deleted for the segment change. Execute crontab-e to edit: */2 */root/websync. sh 6: Execute crontabl-l. If error: 1 occurs, check rsync. config and websync. whether sh has the execution permission. 2: Edit vi/etc/service input rsync 873/tcp and rsync 873/udp 3: Check the configuration file for incorrect symbols and spelling errors.

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.