目录
服务端建立文件服务方法
1. 启动rysnc服务
rsync默认已经被安装在机器上,不再另行介绍安装方法。
编辑rsync的配置文件:/etc/rsyncd.conf,举例如下:
list = false
uid = root
gid = root
ignore errors
read only = yes
#auth users = username
#secrets file = /etc/rsync.passwd
#hosts allow = 192.168.228.38,hostname
hosts allow = *.xxx.com
[tmpBackup]
path = /tmp/backup
read only = yes
ignore errors
hosts allow = *.xxx.com
以上配置文件,将/tmp/backup目录作为远程同步目录暴露出去(访问名:tmpBackup),可以在其他机器(包括跨机房ÿ