rsync客户端配置
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
|
[root@server05 ~]
# crontab -l
*
/10
* * * *
/home/system/rsync/rsync
.sh
[root@server05 ~]
# more /home/system/rsync/rsync.sh
#!/bin/bash
if
test
-e
/tmp/rsync
.pid
then
exit
else
touch
/tmp/rsync
.pid
/home/system/rsync/bin/rsync
-uvrtopg --delete --password-
file
=
/home/system/rsync/rsync
.
passwd
root@192.168.1.2::down
/home/down
rm
-rf
/tmp/rsync
.pid
fi
[root@server05 ~]
# more /home/system/rsync/rsync.passwd
d9jYijw
[root@server05 ~]
# cd
rsync
.
passwd
600
|
rsync服务器端设置
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
[root@server02 ~]
# cd /etc/
[root@server02 etc]
# more rsyncd.conf
uid = root
gid = root
use chroot = no
max connections = 10
pid
file
=
/var/run/rsyncd
.pid
lock
file
=
/var/run/rsync
.lock
log
file
=
/var/log/rsyncd
.log
[down]
path =
/home/down/
auth
users
= root
uid = root
gid = root
read
only =
true
secrets
file
=
/etc/rsyncd
.secrets
[root@server02 etc]
#
[root@server02 etc]
# more rsyncd.secrets
root:d9jYijw-&tTem60
[root@server02 etc]
#
[root@server02 etc]
# ll rsyncd.conf
-rw-r--r-- 1 root root 271 2008-06-01 rsyncd.conf
[root@server02 etc]
# ll rsyncd.secrets
-rw------- 1 root root 21 2007-10-31 rsyncd.secrets
[root@server02 etc]
#rsync --daemon --config=/etc/rsyncd.conf
|