[LINUX]rsync服务配置

记性不好了 总是忘记  只有记录一下了 


1)默认rsync服务没有  /etc/rsyncd.conf文件  需要创建一个  并且贴入以下内容:


uid = root
gid = root
port = 873
hosts allow = 192.168.1.101,192.168.1.102
use chroot = true
max connections = 5
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
log file = /var/log/rsyncd.log


[test]                    
path = /tmp/test 
comment = rsync files
ignore errors
read only = yes
auth users = rsync
secrets file = /etc/rsync.passwd


2) echo "rsync:test" >  /etc/rsync.passwd

3) chmod 600  /etc/rsync.passwd

4) rsync --daemon

5) 客户端: rsync  -avzP rsync@xxx.xxx.xxx.xxx::test  /tmp/



以上记录下



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值