我用了这个,只能单向备份
不过还好用
这里要注意几点:
1:要开启端口,默认是873端口,如果服务器限制了端口,就要在 本地连接的TCP/IP属性里面设置
2:要在服务器端开启服务
我和我的虚拟机测试时的配置文件(主机192.168.1.105 虚拟机 192.168.1.106)
(虚拟机用的时WMware软件)
服务器端:
rsyncd.conf文件
use chroot = false
strict modes = false
hosts allow = *
log file = rsyncd.log
pid file = rsyncd.pid
secrets file = rsyncd.pas #指定用户登录的密码文件
motd file = rsyncd.motd #连接上rsync server时显示的欢迎信息
# Module definitions
# Remember cygwin naming conventions : c:/work becomes /cygwin/c/work
#
[test]
path = /cygdrive/E/QHZX/QHZX.QHB2B.Web
read only = false
transfer logging = yes
客户端:
建立的.bat批处理文件
cd c:/Program Files/cwRsync/bin
rsync.exe -vzrtopg --progress --delete --password-file=/cygdrive/c/rsyncd.pas mm@192.168.1.105::test /cygdrive/c/y
配置文件的意义请参看 http://www.jb51.net/article/15871.htm 这个文章写得还比较易懂
Windows下也有类似unix下的rsync软件,最近我试用了cwRsync软件,把配置和使用方法介绍一下,使用它确实比较方便!
同步Rsync Server软件下载cwRsync_Server_2.0.10_Installer.zip
同步Rsync Client软件下载cwRsync_Client_2.0.10_Installer.zip
在需要传同步文件出来的windows服务器上安装同步Rsync Server软件cwRsync_Server_2.0.10_Installer后,
会在服务器上建一个管理员级别的SvcwRsync用户,我们最好修改一下这个用户的密码。
在此服务器上还增加了一个RsyncServer服务,如果没有设成自动启动,需要设置一下,如下图。
然后在安装了同步Rsync Server和Rsync Client软件的windows服务器上设置环境变量:
把目录C:/Program Files/cwRsyncServer/bin填加到当前用户的path里。
参考网址:
http://www.jb51.net/article/15871.htm
http://www.indang.net/yinyou/2008/92.html
http://hi.baidu.com/377211550/blog/item/c6f75c253310766534a80f54.html
http://www.cnblogs.com/JemBai/archive/2008/10/20/1315182.html