rsync实例记录

2017-12-14  本文已影响0人  EmptyBottl_520d

服务端

# Distributed under the terms of the GNU General Public License v2
# Minimal configuration file for rsync daemon
# # See rsync(1) and rsyncd.conf(5) man pages for help

# This line is required by the /etc/init.d/rsyncd script
pid file = /var/run/rsyncd.pid
port = 873
address = 10.162.81.59
#uid = nobody 
#gid = nobody    
uid = root
gid = root

use chroot = yes
read only = false

#limit access to private LANs
hosts allow=10.111.177.219,10.111.214.166
#hosts deny=*

max connections = 5
motd file = /etc/rsyncd.d/rsyncd.motd
#This will give you a separate log file
log file = /var/log/rsync.log

#This will log every file transferred - up to 85,000+ per user, per sync
#transfer logging = yes

log format = %t %a %m %f %b
syslog facility = local3
timeout = 300


[www]
uid = wwww
gid = daemon
path = /webdata/trust.myweb.com
list=yes
ignore errors
comment = This is www
auth users = web_backup
secrets file = /etc/rsyncd.d/rsyncd_back.pwd



[server]
uid = wwww
gid = daemon
path = /webdata/trustserver_myweb_com/public_html
#path = /webdata/test/public_html
list=yes
ignore errors
comment = This is server
auth users = web_backup
secrets file = /etc/rsyncd.d/rsyncd_back.pwd


[mobile]
uid = wwww
gid = daemon
path = /webdata/m.myweb.com
list=yes
ignore errors
comment = This is server
auth users = web_backup
secrets file = /etc/rsyncd.d/rsyncd_back.pwd

[channel]
uid = wwww
gid = daemon
path = /webdata/channel.myweb.com
list=yes
ignore errors
comment = This is server
auth users = web_backup
secrets file = /etc/rsyncd.d/rsyncd_back.pwd
web_backup:##123.123.456JJKe3326ttdd
this is anyidai rsync_server
=================================================

客户端

00  04 * * * root  /usr/bin/rsync -auv   --password-file=/root/nodel/r.pass  /data/www/trust.myweb.com/   web_backup@10.162.81.59::www  &>>/var/log/rsync_clent.log
30  04 * * * root  /usr/bin/rsync -auv   --password-file=/root/nodel/r.pass  /data/www/m.myweb.com/   web_backup@10.162.81.59::mobile  &>>/var/log/rsync_clent.log
40  04 * * * root /usr/bin/rsync -auv   --password-file=/root/nodel/r.pass  /data/www/channel.myweb.com/   web_backup@10.162.81.59::channel &>>/var/log/rsync_clent.log
##123.123.456JJKe3326ttdd
上一篇下一篇

猜你喜欢

热点阅读