1. 准备 rsyncd.conf
port = 1873
uid = nobody
gid = nobody
use chroot = no
max connections = 9
lock file = /home/s/logs/repo/rsync/rsyncd.lock
pid file = /home/s/logs/repo/rsync/rsyncd.pid
log file = /home/s/logs/repo/rsync/rsyncd.log
transfer logging = yes
log format = %o %h [%a] %m (%u) %f %l
read only = false
write only = true
auth users = repo
secrets file = /home/s/apps/repo/rsync/rsyncd.secrets
[dev]
path = /home/s/var/repo/dev/incoming
comment = dev repository
[stable]
path = /home/s/var/repo/stable/incoming
comment = stable repository
2. 准备 rsyncd.secrets
myuser:mypassword
3. 启动 rsyncd
/usr/bin/rsync --daemon --config /home/s/apps/repo/rsync/rsyncd.conf
/usr/bin/rsync --daemon --help
4. 客户端上传文件
rsync --port=1873 -auv README.txt ::dev
rsync --password-file=repo.password --port=1873 -av data repo@10.119.7.5::repo/tmp/data