Rsync server and client configuration file

Source: Internet
Author: User
Tags inotify

Rsync server and client configuration file the target server configuration file [rsyncd. conf] uid = nobodygid = nobodyuse chroot = nomax connections = 10 strict modes = yespid file =/var/run/rsyncd. pidlock file =/var/run/rsync. locklog file =/var/log/rsyncd. log # Module name [web1] # target server directory path =/usr/local/rubyzhu/testcomment = web1 fileignore errors = yesread only = nowrite only = nolist = falsehosts allow = 127.0.0.1hosts deny = * uid = rootgid = root # authenticated user name, Has nothing to do with the operating system user auth users = backupsecrets file =/etc/rsyncd. secrets client configuration file (monitored system) [inotify-tool.sh self-write script] #! /Bin/shsrc =/usr/local/rubyzhu/test1/# inotify monitored directory des1 = web1 # rsync server module ip1 = 127.0.0.1 # target server IP address user = backup # target server the username of rsyncr's web1 module, unrelated to the operating system user name/usr/local/bin/inotifywait-mrq -- timefmt '% d/% m/% y % H: % m' -- format' % T % w % F' \-e close_write, modify, create, attrib, delete \ $ {src} \ | while read file do rsync-avz -- delete -- progress -- password-file =/etc/server. pass $ {src }$ {user }@$ {ip1 }::: {des1} & # rsync-avz -- delete -- progress -- password-file =/etc/server. pass $ {src }$ {user }@$ {ip2 }::: {des2} & echo "$ {src} was rsynced" echo "-------------------------------------------------" done

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.