cwRsync之一:基本设置与使用

作者:[email protected]

 

1、客户端

(1)根据cwrsync.cmd设置环境变量

 

 

(2)使用

-----------------------------------

C:/cwRsync/bin>rsync -vzrtopg --progress --delete -e 192.168.1.102:/cygdrive/c/work /cygdrive/c/work

sending incremental file list

drwxr-xr-x           0 2010/11/28 16:13:54 work

 

sent 37 bytes  received 13 bytes  100.00 bytes/sec

total size is 0  speedup is 0.00

 

//这语句和上面一样

rsync -vzrtopg --progress --delete -e 192.168.1.102::test /cygdri

ve/c/work

-----------------------------------

说明:-e表示不使用ssh

 

 

正确的是要去掉-e,下面的是正确的:

---------------------------------------------------------------

rsync -vzrtopg --progress --delete 192.168.1.102::test /cygdrive/c/work

receiving incremental file list

./

新建 文本文档.txt

           3 100%    2.93kB/s    0:00:00 (xfer#1, to-check=0/2)

 

sent 48 bytes  received 155 bytes  135.33 bytes/sec

total size is 3  speedup is 0.01

-----------------------------------------------------------------

 

2.服务器

(1)建立一个windows用户,属于administrator组

(1)安装Copssh_4.0.1_Installer.exe(如果不用SSH可以省略)

(2)安装cwRsyncServer_4.0.4_Installer.exe,使用刚建立的windows用户

(3)配置

--------------------------------

use chroot = false

strict modes = false

hosts allow = *

log file = rsyncd.log

 

# Module definitions

# Remember cygwin naming conventions : c:/work becomes /cygwin/c/work

#

[test]

path = /cygdrive/c/work

read only = false

transfer logging = yes

uid = 0

gid = 0

------------------------

uid = 0

gid = 0

是防止@ERROR Invalid UID nobody和@ERROR Invalid GID nobody

 

(3)启动RsyncServer服务

你可能感兴趣的:(windows,ssh,File,服务器,Module,logging)