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 启动服务
时间: 2024-10-22 15:59:15