/etc/rsyncd.conf 配置

以前的配置:

1
2
3
4
5
6
7
8
9
10
11
12
13
id=jot
gid=jot
[1_portal]
path=/home/jot/200g/source/1_portal
read only = no
exclude = /*/target /target /output /web-deploy /setup
allow jot-aliwork
 
[2_core]
path=/home/jot/200g/source/2_coreservice
read only = no
exclude = output web-deploy
allow jot-aliwork

现在的配置:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
uid = nobody
gid = nobody
use chroot = no
read only = true
max connections = 4
syslog facility = local5
pid file = /var/run/rsyncd.pid
log file = /var/log/rsyncd.log
#secrets file = /etc/rsyncd.pwd
 
[1_portal]
        path = /home/jot/workspace/1_portal/
[2_core]
        path = /home/jot/workspace/2_coreservice/
[3_bops]
        path = /home/jot/workspace/3_backoffice/
[4_api]
        path = /home/jot/workspace/4_api/
 
#[cvs]
#        path = /data/cvs
#        comment = CVS repository (requires authentication)
#        auth users = tridge, susan
#        secrets file = /etc/rsyncd.secrets

启动方式:

1
2
3
/usr/bin/rsync --daemon --config=/etc/rsyncd.conf
sudo /etc/rc.d/rsyncd restart
rsync -avz --delete arch-jot::1_portal /home/jot/200g/source/1_portal/ --exclude=/*/target --exclude=/target --exclude=/output --exclude=/web-deploy --exclude=/setup

Q&A:
rsync: delete_file: unlink “…” failed: Permission denied (13)
– 要有x权限

无觅相关文章插件,快速提升流量

发表评论?

1 条评论。

  1. 非常好,在这里学会了第一次用这个,以后就会啦,万分感谢!

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">