server端rsync --daemon之后,客户端跑:
rsync -avruzb -e 'ssh -p 22222' --progress deployuser@ch2:/srvdata/ srvdata/
目前还没看出优越性,不过可以增量更新倒是很好。
rsync -a 192.168.163.143:/tmp,相当于ls命令。
增加--partial选项,可以防止忽然断开,文件没有保存的问题。
/etc/rsyncd.conf文件:
uid = root
gid = root
use chroot = no
strict modes = yes
port = 873
max connections = 10
pid file = /var/run/rsyncd.pid
motd file=/etc/rsyncd.motd
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log
[home]
path=/
comment = this is a test
ignore errors
read only = yes
list = no
auth users = root
secrets file = /etc/rsyncd.pas