cwrsync 四步實現(xiàn)windows備份
更新時間:2008年09月17日 13:25:03 作者:
對于rsync數(shù)據(jù)同步經(jīng)常會遇到一些問題,下面的對于這些問題的解決,一定要逐個測試
服務(wù)器端:
http://rsync.samba.org/ 服務(wù)器端(cwRsyncServer)。
安裝目錄: E:\cwRsyncServer
端口: 52326
ip: 219.152.120.82
一:修改cwRsyncServer配置文件 E:\cwRsyncServer\rsyncd.conf
#########
port = 52326
use chroot = false
strict modes = false
read only = yes
list = no
hosts allow = *
max connections = 10
secrets file = rsyncd.secrets #指定用戶登錄的密碼文件
motd file = rsyncd.motd #連接上rsync server時顯示的歡迎信息
log file = rsyncd.log
pid file = rsyncd.pid
transfer logging = yes
# Module definitions
# Remember cygwin naming conventions : c:\work becomes /cygwin/c/work
#
[test]
path = /cygdrive/c/work
read only = false
transfer logging = yes
[t_task]
path = /cygdrive/c/work
read only = false
transfer logging = yes
#################################
二:在E:\cwRsyncServer目錄下新建密碼文件 rsyncd.secrets 內(nèi)容為用戶名:密碼
如: tly:fjs249slke
客戶端:
http://rsync.samba.org/ 下載cwRsync客戶端(cwRsync)
安裝目錄: E:\cwRsync
三:在E:\cwRsyncServer目錄下新建密碼文件 rsyncd.secrets 內(nèi)容為密碼
如:fjs249slke
四:開始–>運行–>cmd 輸入以下命令即可同步服務(wù)器端t_task模塊到客戶端e:/y目錄下。
E:\cwRsync\bin\rsync.exe -vazu –exclude article/ –progress –delete –
password-file=E:\cwRsync\rsyncd.secrets
rsync://odinxu@219.152.120.82:52326/t_task /cygdrive/e/y
照做可同步服務(wù)了,如果不行,1.檢查服務(wù)器是否有開服務(wù)端口,命令行輸入( netstat -a ) 可查看服務(wù)器開的端口。就是上面的52326端口。2.客戶端命令行輸入( telnet 服務(wù)端ip 服務(wù)端口 ) 能否連接服務(wù)器端。3.檢查配置文件是否跟上面一樣。
注:以上為匿名連接入服務(wù)器端,一般會在模塊里添加 auth user= odinxu 指定用戶,一定要注意,指定的用戶必須要登陸才能進(jìn)行同步服務(wù)。 我在這里掐了很久,模塊里指定了用戶,用戶又沒有登陸,導(dǎo)致出錯。
新手常出現(xiàn)的錯誤:
錯誤1: rsync: read error: Connection reset by peer (104)
rsync error: error in rsync protocol data stream (code 12) at io.c(794) [receive
r=3.0.2]
解決:很大可能是服務(wù)器端沒有開啟 rsync 服務(wù)。開啟服務(wù)。
錯誤2:@ERROR: chdir failed
rsync error: error starting client-server protocol (code 5) at main.c(1495) [rec
eiver=3.0.2]
解決:服務(wù)器端同步目錄沒有權(quán)限,cwrsync默認(rèn)用戶是Svcwrsync。為同步目錄添加用戶Svcwrsync權(quán)限。
錯誤3:@ERROR: failed to open lock file
rsync error: error starting client-server protocol (code 5) at main.c(1495) [rec
eiver=3.0.2]
解決:配置文件 rsync.conf中添加 lock file = rsyncd.lock 即可解決。
更具體的實現(xiàn)方法可以參考:http://chabaoo.cn/article/19663.htm
http://rsync.samba.org/ 服務(wù)器端(cwRsyncServer)。
安裝目錄: E:\cwRsyncServer
端口: 52326
ip: 219.152.120.82
一:修改cwRsyncServer配置文件 E:\cwRsyncServer\rsyncd.conf
#########
port = 52326
use chroot = false
strict modes = false
read only = yes
list = no
hosts allow = *
max connections = 10
secrets file = rsyncd.secrets #指定用戶登錄的密碼文件
motd file = rsyncd.motd #連接上rsync server時顯示的歡迎信息
log file = rsyncd.log
pid file = rsyncd.pid
transfer logging = yes
# Module definitions
# Remember cygwin naming conventions : c:\work becomes /cygwin/c/work
#
[test]
path = /cygdrive/c/work
read only = false
transfer logging = yes
[t_task]
path = /cygdrive/c/work
read only = false
transfer logging = yes
#################################
二:在E:\cwRsyncServer目錄下新建密碼文件 rsyncd.secrets 內(nèi)容為用戶名:密碼
如: tly:fjs249slke
客戶端:
http://rsync.samba.org/ 下載cwRsync客戶端(cwRsync)
安裝目錄: E:\cwRsync
三:在E:\cwRsyncServer目錄下新建密碼文件 rsyncd.secrets 內(nèi)容為密碼
如:fjs249slke
四:開始–>運行–>cmd 輸入以下命令即可同步服務(wù)器端t_task模塊到客戶端e:/y目錄下。
E:\cwRsync\bin\rsync.exe -vazu –exclude article/ –progress –delete –
password-file=E:\cwRsync\rsyncd.secrets
rsync://odinxu@219.152.120.82:52326/t_task /cygdrive/e/y
照做可同步服務(wù)了,如果不行,1.檢查服務(wù)器是否有開服務(wù)端口,命令行輸入( netstat -a ) 可查看服務(wù)器開的端口。就是上面的52326端口。2.客戶端命令行輸入( telnet 服務(wù)端ip 服務(wù)端口 ) 能否連接服務(wù)器端。3.檢查配置文件是否跟上面一樣。
注:以上為匿名連接入服務(wù)器端,一般會在模塊里添加 auth user= odinxu 指定用戶,一定要注意,指定的用戶必須要登陸才能進(jìn)行同步服務(wù)。 我在這里掐了很久,模塊里指定了用戶,用戶又沒有登陸,導(dǎo)致出錯。
新手常出現(xiàn)的錯誤:
錯誤1: rsync: read error: Connection reset by peer (104)
rsync error: error in rsync protocol data stream (code 12) at io.c(794) [receive
r=3.0.2]
解決:很大可能是服務(wù)器端沒有開啟 rsync 服務(wù)。開啟服務(wù)。
錯誤2:@ERROR: chdir failed
rsync error: error starting client-server protocol (code 5) at main.c(1495) [rec
eiver=3.0.2]
解決:服務(wù)器端同步目錄沒有權(quán)限,cwrsync默認(rèn)用戶是Svcwrsync。為同步目錄添加用戶Svcwrsync權(quán)限。
錯誤3:@ERROR: failed to open lock file
rsync error: error starting client-server protocol (code 5) at main.c(1495) [rec
eiver=3.0.2]
解決:配置文件 rsync.conf中添加 lock file = rsyncd.lock 即可解決。
更具體的實現(xiàn)方法可以參考:http://chabaoo.cn/article/19663.htm
您可能感興趣的文章:
- 在Windows中配置Rsync同步文件的方法
- 用rsync實現(xiàn)windows與linux文件同步的方法
- windows下rsync的數(shù)據(jù)同步安裝配置方法
- windows下使用cwRsync定期備份網(wǎng)站(服務(wù)器文件同步)
- cwrsync實現(xiàn)從linux到windows的數(shù)據(jù)同步備份
- 使用cwRsync實現(xiàn)windows下服務(wù)器文件定時同步備份(附錯誤處理方法)
- 用cwrsync同步windows下數(shù)據(jù)的簡單配置方法
- Windows rsync服務(wù)器備份配置實例
- windows2008系統(tǒng)中rsync計劃任務(wù)返回0x1問題處理
相關(guān)文章
windows+IIS 環(huán)境下以Fastcgi方式配置php 5.3.3的方法
需要在IIS6.0下配置PHP,由于php 5.3.3已經(jīng)不再支持isapi配置了,因此需采用fastcgi方式配置,下面分享一下我的配置過程。2010-12-12Windows Server 2019 取消默認(rèn)IE 瀏覽器安全增強配置的步驟
Windows Server 2019 操作系統(tǒng)打開ie瀏覽器的時候各種對話框提示,下面就為大家分享一下解決方法2022-08-08IIS6 w3wp.exe進(jìn)程占用cpu和內(nèi)存過多的解決方法
今天有朋友問我他的服務(wù)器網(wǎng)站訪問很卡,內(nèi)存及CPU占用不能及時釋放,從而導(dǎo)致服務(wù)器響應(yīng)速度很慢,這里簡單介紹下,方便需要的朋友2013-12-12win2003服務(wù)器安全必做基礎(chǔ)設(shè)置
win2003服務(wù)器安全必做基礎(chǔ)設(shè)置,下面都是一些比較基本的操作,其實大家可以到s.jb51.net下載一些安全設(shè)置軟件更快,但下面是一些基礎(chǔ)的東西,推薦大家學(xué)習(xí)下。2011-11-11Windows2003 服務(wù)器安全配置詳細(xì)篇
今天演示一下服務(wù)器權(quán)限的設(shè)置,實現(xiàn)目標(biāo)是系統(tǒng)盤任何一個目錄asp網(wǎng)馬不可以瀏覽,事件查看器完全無錯,所有程序正常運行.2010-03-03Windows Server 2008 架設(shè) Web 服務(wù)器教程(圖文詳解)
雖然 Windows Server 2008 內(nèi)置了I IS 7.0,但是默認(rèn)情況下并沒有安裝。由于 Windows Server 2008 中安裝 IIS 服務(wù)和以前操作相比有很大的不同,因此首先要首先需要參照下述步驟安裝 IIS 7.0 組件2015-07-07Win2003 64位下ASP無法連接Access數(shù)據(jù)庫的解決方法
64位Windows 2003下面配置好IIS后,運行ASP頁面,如果里面有連接access數(shù)據(jù)庫的代碼,就會出現(xiàn)錯誤警告2010-08-08