如題所描述的錯誤,在客戶端執行 rsync同步的時候同樣會提示一個沒見到過的錯誤,但是根據報錯信息和互聯網搜索,可以得到大致是解決的方案,我匯總一下,如下所展示,如果您遇到了類似的問題,希望能夠這樣解決:
1.首先去服務器端的cwRsync上面檢查安裝目錄下是否有
rsyncd.conf
這個文件,這個文件是進行配置reync服務端的配置文件,里面的默認內容為:
1 use chroot = false 2 strict modes = false 3 hosts allow = * 4 log file = rsyncd.log 5 6 # Module definitions 7 # Remember cygwin naming conventions : c:\work becomes /cygwin/c/work 8 # 9 [test] 10 path = /cygdrive/c/work 11 read only = false 12 transfer logging = yes
這樣的信息可能不能夠完成我們的初始化需要,因此需要在這個基礎上進行一下改造:
1 use chroot = false 2 strict modes = false 3 hosts allow = * 4 log file = rsyncd.log 5 pid file = rsyncd.pid 6 uid = 0 7 gid = 0 8 9 # Module definitions 10 # Remember cygwin naming conventions : c:\work becomes /cygwin/c/work 11 # 12 [backup] 13 comment = OurFuture 14 path = /cygdrive/e/backup 15 read only = no 16 transfer logging = yes 17 secrets file = /cygdrive/e/rsync.pass
對於本問題,我所做的修改主要是第六行,第七行,這樣的操作時允許所有的用戶與組參與同步。
2.如果這樣操作還是沒用,而轉換成了另一種錯誤提示
@ERROR: invalid gid nobody
那請參考上一篇日志,解決一下密碼文件的權限問題,就可以了。
3.同時如果遇到這個問題
sending incremental file list
ERROR: module is read only
rsync: read error: Software caused connection abort (113)
rsync error: error in rsync protocol data stream (code 12) at io.c(769) [sender=3.0.7]
請嘗試修改上述原始配置文件中的第十一行,使其保持False或者0的參數。
4.處理好的同步語句,在客戶端上執行后的樣子:
rsync -av /cygdrive/e/test/ administrator@10.5.83.25::backup
sending incremental file list
./
新建 RTF 文檔 (2).rtf
新建 RTF 文檔.rtf
新建壓縮(zipped)文件夾.zip
sent 276 bytes received 74 bytes 700.00 bytes/sec
total size is 36 speedup is 0.10
-=EOB=-
