uid = nobody
gid = nobody
use chroot = no
#客户端最大连接数
max connections = 4
#PID及LOCK文件位置
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
#日志文件位置
log file = /var/log/rsyncd.log
# 设置可以镜像的目录及相关
#认证的模块名,在client端需要指定
[ilearn]
# 可以镜像的目录
path = /home/ilearn/product/ias904/content_server/public
#对用途的说明
comment = testcomment
#服务器上的目录及文件可写
read only = no
ignore errors
list = no
#允许进行rsync的客户端网段或IP
hosts allow=192.168.1.30
#可镜像此目录的用户名,当用多个用户时,可用,号进行分开
# auth users = root
# 声明密码文件
# secrets file = /etc/rsyncd.scrt
开通命令:rsync --daemon
定时器:* * * * * /root/res_bak.sh >>/root/res.log
res_bak.sh 脚本
#!/bin/sh
PATH=/usr/local/bin:/usr/bin:/bin
rsync -vzrtopg --progress --delete ilearn@192.168.1.20::ilearn /home/ilearn/product/ias904/content_server/public
exit 0
gid = nobody
use chroot = no
#客户端最大连接数
max connections = 4
#PID及LOCK文件位置
pid file = /var/run/rsyncd.pid
lock file = /var/run/rsync.lock
#日志文件位置
log file = /var/log/rsyncd.log
# 设置可以镜像的目录及相关
#认证的模块名,在client端需要指定
[ilearn]
# 可以镜像的目录
path = /home/ilearn/product/ias904/content_server/public
#对用途的说明
comment = testcomment
#服务器上的目录及文件可写
read only = no
ignore errors
list = no
#允许进行rsync的客户端网段或IP
hosts allow=192.168.1.30
#可镜像此目录的用户名,当用多个用户时,可用,号进行分开
# auth users = root
# 声明密码文件
# secrets file = /etc/rsyncd.scrt
开通命令:rsync --daemon
定时器:* * * * * /root/res_bak.sh >>/root/res.log
res_bak.sh 脚本
#!/bin/sh
PATH=/usr/local/bin:/usr/bin:/bin
rsync -vzrtopg --progress --delete ilearn@192.168.1.20::ilearn /home/ilearn/product/ias904/content_server/public
exit 0