首页 > 代码库 > Rsync同步服务器

Rsync同步服务器

Rsync

比scp更强大的同步工具


安装rsync(本地默认有的)

vim /etc/rsyncd.conf


uid = nobody

gid = nobody

use chroot = no

max connections = 30

pid file = /var/run/rsyncd.pid

lock file = /var/run/rsyncd.lock

log file = /var/log/rsyncd.log

transfer logging = yes

log format = %t %a %m %f %b

syslog facility = local3

timeout = 300

 

[www]

read only = yes

path = /usr/local/webapps

comment = www

auth users =test

secrets file = /etc/rsync.pas

hosts allow = 192.168.0.11,192.168.0.12

 

[web]

read only = yes

path = /data/www/web

comment = web

auth users =test

secrets file = /etc/rsync.pas

hosts allow = 192.168.1.11,192.168.0.0/24


rsync --demon 启动服务

Rsync同步服务器