缺省配置文件/etc/rsyncd.conf,内容示例:
-
uid = nobody
-
gid = nobody
-
use chroot = no
-
pid file = /var/run/rsync.pid
-
lock file = /var/run/rsync.lock
-
log file = /var/log/rsync.log
-
-
-
[MODULE_HOME_FOO]
-
path=/home/foo/
-
uid = foo
-
gid = foo
-
read only = yes
-
#allow hosts = 10.16.1.1
编辑完配置文件后保存,然后以daemon方式启动rsync:
完成后即启动了一个rsyncd server,执行下面命令查看上面都有哪些模块:
rsync
${RSYNCD_HOSTNAME}::
同步某个模块到本地:
rsync -ar
${RSYNCD_HOSTNAME}::FOO ./
阅读(231) | 评论(0) | 转发(0) |