默认没有/etc/rsync.conf配置文件,要自己创建。然后写入配置内容:
use chroot = no
hosts allow = 10.0.0.0/24
hosts deny = *
[pro]
path = /var/www/project/
comment = project1
uid = www-data
gid = www-data
read only = false
hosts allow = *
[pro_dev]
path = /var/rsync/project/dev/
comment = project1 DEV
uid = www-data
gid = www-data
read only = false
hosts allow = *
[pro_qa]
path = /var/rsync/project/qa/
comment = project1 QA
uid = www-data
gid = www-data
read only = false
hosts allow = *
[pro2_dev]
path = /var/rsync/project2/dev/
comment = DEV for project2
read only = false
[pro2_stable]
path = /var/rsync/project2/stable/
comment = STABLE for project2
uid = www-data
gid = www-data
read only = false
hosts allow = 10.0.0.19
[pro2_review]
path = /var/rsync/project2/review/
comment = REVIEW for project2
uid = www-data
gid = www-data
read only = false
hosts allow = *