知识屋:更实用的电脑技术知识网站
所在位置:首页 > 操作系统 > linux

linux下安装使用rsync

发布时间:2014-09-05 16:20:45作者:知识屋

 
先安装rsync
然后find / -name "rsync"  找到安装的文件
 
创建rsync的相关配置文件 
mkdir /etc/rsync
vi rsync.conf
# 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   -www.zhishiwu.com-
address = 172.23.1.1
#uid = nobody
#gid = nobody
uid = 0
gid = 0  
 
use chroot = no
     
#limit access to private LANs
hosts allow=172.23.0.0/255.255.0.0 192.168.3.0/255.255.255.0
hosts deny=* 
 
max connections = 5
motd file = /etc/rsyncd/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  -www.zhishiwu.com-
 
log format = %t %a %m %f %b
syslog facility = local3
timeout = 300
     
[同步]
path = /data/tongbu
list=yes
ignore errors
#auth users = user
read only = false
#secrets file = /etc/rsyncd/rsyncd.secrets
comment = back  -www.zhishiwu.com-
 
以上是我的配置文件,因为配置认证没有成功,所以没有配置认证同步了。以后再调试认证同步。
 
启动rsync
rsync --daemon --config=/etc/rsync/rsyncd.conf
修改防火墙,开放tcp 873端口
 
vi rsync.secrets
  user:password
 
客户端:
rsync.exe -uvzrtopg --progress --delete /cygdrive/d/work/ user@172.23.1.1::tongbu
 
 
 
 
作者 lnwu
(免责声明:文章内容如涉及作品内容、版权和其它问题,请及时与我们联系,我们将在第一时间删除内容,文章内容仅供参考)
收藏
  • 人气文章
  • 最新文章
  • 下载排行榜
  • 热门排行榜