码迷,mamicode.com
首页 > 其他好文 > 详细

rsync

时间:2017-04-07 00:48:55      阅读:137      评论:0      收藏:0      [点我收藏+]

标签:http   path   res   logging   内容   user   html   for   log   

参考:http://www.cnblogs.com/itech/archive/2009/08/10/1542945.html

yum -y install rsync

配置文件

vim /etc/rsyncd.conf

# /etc/rsyncd: configuration file for rsync daemon mode

# See rsyncd.conf man page for more options.

# configuration example:

 uid = nobody
 gid = nobody
 use chroot = no
 max connections = 4
 pid file = /var/run/rsyncd.pid
# exclude = lost+found/
# transfer logging = yes
 timeout = 900
# ignore nonreadable = yes
# dont compress   = *.gz *.tgz *.zip *.z *.Z *.rpm *.deb *.bz2

# [ftp]
#        path = /home/ftp
#        comment = ftp export area
[csmh]
path = /home/wwwroot/csmh
auth users = zhong
ignore errors
secrets file = /etc/rsyncd.secrets
#exclude = cache/
[gjml]
path = /home/wwwroot/gjml
auth users = zhong
ignore errors
secrets file = /etc/rsyncd.secrets
#exclude = cache/
[xian]
path = /home/wwwroot/xian
auth users = zhong
ignore errors
secrets file = /etc/rsyncd.secrets

 密码文件

 vim /etc/rsyncd.secrets

zhong:123456

 客户端同步

从服务端拉取

rsync -avzP zhong@47.93.123.70::csmh rr --delete --password-file=/etc/rsyncd.secrets

/etc/rsyncd.secrets 文件内容为密码

123456

往服务端推送

rsync -avzP /home/tt.txt zhong@47.93.123.70::csmh --delete --password-file=/etc/rsyncd.secrets

rsync

标签:http   path   res   logging   内容   user   html   for   log   

原文地址:http://www.cnblogs.com/jkklearn/p/6676100.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!