rsync server配置


rsyncd.conf:


# sample rsyncd.conf configuration file



# GLOBAL OPTIONS

#每次连接输出给客户端的信息

#motd file=/etc/motd     


log file=/var/log/rsyncd
# for pid file, do not use /var/run/rsync.pid if
# you are going to run rsync out of the init.d script.
pid file=/var/run/rsyncd.pid
syslog facility=daemon
#socket options=


# MODULE OPTIONS

#需同步的模块,可以有多个
[yougotit]

#客户端list时,显示的模块说明信息

comment = public archive 

#此模块所在的路径

path = /root/wdc/progams
use chroot = no
# max connections=10
lock file = /var/lock/rsyncd
# the default for read only is yes...
read only = yes

list = yes

#该选项指定当该模块传输文件时守护进程应该具有的uid

uid = root
gid = root
# exclude = 
# exclude from = 
# include =
# include from =

auth users = wdc root

#secrets file 文件内 一个条目一行      user:password

secrets file = /etc/rsyncd.secrets

#严格模式,要求secrets file的mode 为  只能被rsync服务器运行身份的用户访问,其他任何用户不可以访问该文件, 一般为0600

strict modes = yes

#当hosts allow和hosts deny对某一ip都设置时,allow优先

hosts allow = 192.168.137.2
# hosts deny = 192.168.137.2
ignore errors = no
ignore nonreadable = yes
transfer logging = no
# log format = %t: host %h (%a) %o %f (%l bytes). Total %b bytes.
timeout = 600
refuse options = checksum dry-run

dont compress = *.gz *.tgz *.zip *.z *.rpm *.deb *.iso *.bz2 *.tbz


daemon方式启动rsync: rsync --daemon

   配置好后的使用方式:

rsync -av root@192.168.137.2::yougotit/trie ./test/

   将192.168.137.2里同步目录下的trie同步到本地test下


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值