首页 > 代码库 > rsync inotify
rsync inotify
rsync客户端+inotify-tools 1.1.1.12
rsync服务器 1.1.1.11
1.1.1.12配置
[root@slave3 wwwroot]# cat /etc/rsyncd-web.sh #!/bin/bash host1=1.1.1.11 src=http://www.mamicode.com/web/wwwroot/"${files} was rsynced" >>/tmp/rsync.log 2>&1 done
认证文件:
[root@slave3 ~]# cat /etc/server.pass rsync
echo "/usr/bin/rsync --daemon" >>/etc/rc.local /usr/bin/rsync
1.1.1.11配置
[root@slave2 wwwroot]# cat /etc/rsyncd.conf uid = nobody gid = nobody use chroot = no max connections = 10 strict modes = yes pid file = /var/run/rsyncd.pid lock file = /var/run/rsync.lock log file = /var/log/rsyncd.log [web1] path = /web1/wwwroot/ comment = web1 file ignore errors read only = no write only = no hosts allow = 1.1.1.12 hosts deny = * list = false uid = root gid = root auth users = web1user secrets file = /etc/web1.pass
nohup /etc/rsyncd-web.sh &
[root@slave2 wwwroot]# cat /etc/web1.pass rsync:rsync rsync --
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。