下载cwRsyncServer服务器端与客户端的安装文件:
服务端下载:cwRsyncServer_4.0.5_Installer.zip
客户端下载:cwRsync_4.0.5_Installer.zip
 
服务端的配置(192.168.0.21):
安装服务端软件cwRsyncServer_4.0.5,安装时需要输一个用户名和密码,输入本机administrator的用户名密码即可。

安装完成后,在系统服务中,启动RsyncServer服务,并设置为开机自启动

测试RsyncServer是否运行正常,查看是否有873端口是监听状态

进入到RsyncServer的安装目录,默认应该是C:\Program Files\ICW 编辑rsyncd.conf配置文件(用写字板或者记事本打开即可),删除里面的所有配置,并添加下面的代码,再修改path路径即可(/cygdrive/C/heminjie代表C:\heminjie目录)

use chroot = false
strict modes = false
read only = yes
list = no
hosts allow = *
max connections = 10
lock file = rsyncd.lock
motd file = rsyncd.motd
log file = rsyncd.log
transfer logging = yes
uid = 0
gid = 0
auth users= rsyncuser
secrets file = rsyncd.secrets
# Module definitions
# Remember cygwin naming conventions : c:\work becomes /cygwin/c/work
#
[test]
path = /cygdrive/C/heminjie
read only = false
transfer logging = yes
ignore errors

再在安装目录下创建rsyncd.secrets密码文件,里面内容为 用户名:密码

rsyncuser:rsyncuser

修改rsyncd.secrets权限为600

客户端的配置(192.168.0.22):
安装客户端软件cwRsync_4.0.5

客户端默认的安装路径为C:\Program Files\cwRsync 在C盘根目录下创建密码文本password.txt,内容为rsyncuser用户的密码rsyncuser

rsyncuser

执行同步命令,输入密码rsyncuser,同步服务器上c:\heminjie到d:\heminjie

批处理脚步运行(可设置计划任务),创建.bat文件,里面内容如下

@echo off "C:\Program Files\cwRsync\bin\rsync.exe" -vzrtopg --progress rsyncuser@192.168.0.21::test "/cygdrive/D/heminjie" < c:\password.txt

常见错误:
@ERROR: auth failed on module test
rsync error: error starting client-server protocol (pre 5) at main.c(1506) [Receiver=3.0.7].
原因:
验证用户名密码错误 确认服务端用户验证文件rsyncd.secrets里面的用户名密码与客户端密码文件rsyncd.secrets里面的密码一样
 
password file must not be other-accessible
continuing without password file
原因:
yrsyncd.secret未被设置为rsyncuser可写其他不能读(600)

Windows下cwRsyncServer双机连续同步部署的更多相关文章

  1. [转帖]Windows下cwRsyncServer双机连续同步部署

    Windows下cwRsyncServer双机连续同步部署 https://www.cnblogs.com/nulige/p/7607503.html 找时间做一下测试 应该能更好的实现 自动部署的功 ...

  2. windows下Redis 主从读写分离部署

    原文:windows下Redis 主从读写分离部署 1.可直接下载window下的运行文件(下面这个链接) 也可以浏览github 查看相应的版本说明文档 https://github.com/Ser ...

  3. windows下dubbo-admin和zookeeper安装部署

    1.   概述 ZooKeeper是Hadoop的正式子项目,它是一个针对大型分布式系统的可靠协调系统,提供的功能包括:配置维护.名字服务.分布式同步.组服务等.ZooKeeper的目标就是封装好复杂 ...

  4. windows 下开发的 .netCore MVC 部署到 Linux(Mint)

    这两天在公司跟同事偶然聊到 .netCore,说到一些趋势什么的.但是说来说去自己也没试过在Linux 机子上部署过,所以就试一下. 尝试之前也在网上看了一些文章,包括 Linux 上.netCore ...

  5. 【MongoDB】 windows下建立双机主从

    [双机配置] 服务端: 两台 Dell R730 双路E5 服务器 使用一个内网环境,网段20, ping 测试互通 主服ip: 192.168.20.176: 27017 从服ip: 192.168 ...

  6. windows下 MySQL数据库双向同步 配置步骤

          最近在项目中遇到了要实现服务器上MySql数据双向同步,在网上找了很多资料,但是大部分都是在liux系统下配置的, 而且都是互相转载,没有一个详细的步骤,于是决定写一个windows系统下 ...

  7. Windows下mysql5.5主从同步

    前置条件: A主机(作为主服务器) 环境:Win7,mysql5.5 IP:172.17.42.82 B主机(作为从服务器) 环境:Win7,mysql5.5 IP:172.17.42.156 主服务 ...

  8. Windows下Redis的安装和部署

    Redis 简介 Redis 是完全开源免费的,遵守BSD协议,是一个高性能的key-value数据库. Redis 与其他 key - value 缓存产品有以下三个特点: Redis支持数据的持久 ...

  9. Windows下ActiveMQ下载、安装部署

    1.下载:http://activemq.apache.org/download.html 最新Windows版本   2.安装 (1) 首先配置JAVA环境变量 JAVA_HOME=D:\Progr ...

随机推荐

  1. weex & web app & vue

    weex & web app & vue https://weex-project.io/tools/playground.html https://weex.apache.org/ ...

  2. LeetCode -- Search a 2D Matrix & Search a 2D Matrix II

    Question: Search a 2D Matrix Write an efficient algorithm that searches for a value in an m x n matr ...

  3. hihocoder 后缀自动机二·重复旋律5

    求不同子串个数 裸的后缀自动机 #include<cstring> #include<cmath> #include<iostream> #include<a ...

  4. php 字符串重要函数

    1.chop() 从字符串右端移除字符 chop(string,charlist) $str="hello world~"; echo chop($str,"ld~&qu ...

  5. 转:Java NIO(3)

    要想讲清楚nio的原理和它的优点得先清楚Java应用程序的文件读写原理和虚拟内存的原理.Java文件读取原理可参见如下图: 当应用程序需要读取文件的时候,内核首先通过DMA技术将文件内容从磁盘读入内核 ...

  6. Java中Collections的binarySearch方法

    方法一 public static <T> int binarySearch(List<? extends Comparable<? super T>> list, ...

  7. UVA 10803 Thunder Mountain

    纠结在这句话了If it is impossible to get from some town to some other town, print "Send Kurdy" in ...

  8. Linux安转jdk

    1. 创建目录 > mkdir  /opt/java > cd /opt/java 2. 下载jdk压缩包到上述目录 jdk-8u162-linux-x64.tar.gz 3. 解压缩.建 ...

  9. 获取dnspod指定域名的记录

    #!/usr/bin/python #-*- coding: utf-8 -*- import os,requests,json import re,time,xlsxwriter #时间 date= ...

  10. python--enum

    # enum用于枚举,该模块下有一个Enum,我们定义的类要继承它 # 一旦继承,那么我们定义的key(仮),不能有重复值. # 如果要保证value(仮)不重复,那就引入unique,给我们定义的类 ...