linux下安装使用rsync

来源:岁月联盟 编辑:exp 时间:2012-03-29
 先安装rsync然后find / -name "rsync"  找到安装的文件 创建rsync的相关配置文件 mkdir /etc/rsyncvi 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 scriptpid file = /var/run/rsyncd.pidport = 873   -www.2cto.com-address = 172.23.1.1#uid = nobody#gid = nobodyuid = 0gid = 0   use chroot = no     #limit access to private LANshosts allow=172.23.0.0/255.255.0.0 192.168.3.0/255.255.255.0hosts deny=*  max connections = 5motd 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.2cto.com- log format = %t %a %m %f %bsyslog facility = local3timeout = 300     [同步]path = /data/tongbulist=yesignore errors#auth users = userread only = false#secrets file = /etc/rsyncd/rsyncd.secretscomment = back  -www.2cto.com- 以上是我的配置文件,因为配置认证没有成功,所以没有配置认证同步了。以后再调试认证同步。 启动rsyncrsync --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