使用cwRsync同步windows系統間的檔案
準備安裝檔案:cwRsync_Server_2.1.3_Installer.zip(伺服器)、cwRsync_2.1.3_Installer.zip(客戶端)
為了測試方便,我的server和client安裝在同一臺機器上。
首先,安裝cwRsync_Server_2.1.3_Installer.zip(伺服器),完成後到windows“服務”中開啟RsyncServer服務,
安裝cwRsync_2.1.3_Installer.zip(客戶端),完成後將C:\Program Files\cwRsync\bin(客戶端安裝路徑)設定到path中。
首先,安裝cwRsync_Server_2.1.3_Installer.zip(伺服器),完成後到windows“服務”中開啟RsyncServer服務,
安裝cwRsync_2.1.3_Installer.zip(客戶端),完成後將C:\Program Files\cwRsync\bin(客戶端安裝路徑)設定到path中。
伺服器配置:
伺服器安裝路徑:C:\Program Files\cwRsyncServer
編輯:C:\Program Files\cwRsyncServer\rsyncd.conf
-------------------------------------------------
use chroot = false
strict modes = false
hosts allow = *
log file = rsyncd.log
pid file = rsyncd.pid
secrets file = password.txt
伺服器安裝路徑:C:\Program Files\cwRsyncServer
編輯:C:\Program Files\cwRsyncServer\rsyncd.conf
-------------------------------------------------
use chroot = false
strict modes = false
hosts allow = *
log file = rsyncd.log
pid file = rsyncd.pid
secrets file = password.txt
# Module definitions
# Remember cygwin naming conventions : c:\work becomes /cygwin/c/work
#
[test]
path = /cygdrive/c/db
read nly = false
transfer logging = yes
auth users = byfree
-------------------------------------------------
上面配置檔案中:
hosts allow指定允許訪問的客戶端IP,*表示客戶端IP不受限制
secrets file指定口令檔案,格式為username:password,存放路徑為C:\Program Files\cwRsyncServer\password.txt
path = /cygdrive/c/db,表示windows的c:\db路徑
auth users這裡設定的使用者是password.txt檔案中的username
# Remember cygwin naming conventions : c:\work becomes /cygwin/c/work
#
[test]
path = /cygdrive/c/db
read nly = false
transfer logging = yes
auth users = byfree
-------------------------------------------------
上面配置檔案中:
hosts allow指定允許訪問的客戶端IP,*表示客戶端IP不受限制
secrets file指定口令檔案,格式為username:password,存放路徑為C:\Program Files\cwRsyncServer\password.txt
path = /cygdrive/c/db,表示windows的c:\db路徑
auth users這裡設定的使用者是password.txt檔案中的username
客戶端配置:
客戶端安裝路徑:C:\Program Files\cwRsync
編輯一個bat檔案,便於同步
編輯rsy.bat
-------------------------------------------------
rsync -vzrtopg --progress --delete byfree@172.17.125.115::test /cygdrive/c/aa/
-------------------------------------------------
byfree@172.17.125.115 byfree是伺服器端password.txt中的username,IP地址是server ip
::test 是伺服器端配置檔案rsyncd.conf中的[test]
/cygdrive/c/aa/ 是客戶端路徑c:\aa
執行rsy.bat,輸入口令(password.txt中的password),客戶端目錄c:\aa將與伺服器端目錄c:\db同步。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17997/viewspace-609568/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 在Windows10系統中同步Internet 時間Windows
- windows10系統如何更改檔案建立和修改時間Windows
- Windows10系統怎麼暫停和恢復OneDrive檔案同步Windows
- windows共享到linux系統檔案WindowsLinux
- 使用 Syncthing 在多個裝置間同步檔案
- 使用Unison 同步檔案
- windows10中的windows的系統舊檔案如何刪除Windows
- MySQL 系統表空間檔案解析MySql
- 使用Java操作Windows系統登錄檔JavaWindows
- windows10系統開啟STP檔案的方法Windows
- Windows10系統開啟torrent檔案的方法Windows
- 讓windows系統顯示隱藏檔案Windows
- 不同語言的Windows系統下的檔案解壓Windows
- windows10系統下開啟jnt檔案的方法Windows
- 如何在Linux系統安裝檔案同步工具:FreeFileSync?Linux
- 使用ln同步檔案內容,支援忽略檔案
- Linux系統時間同步方法。Linux
- windows10系統如何開啟markdown檔案Windows
- windows10系統如何修改檔案型別Windows型別
- 使用 Fstransform 轉換檔案系統ORM
- 【Python】Python 使用http時間同步設定系統時間原始碼PythonHTTP原始碼
- Linux系統篇-檔案系統&虛擬檔案系統Linux
- windows系統git使用ssh方式和gitee/github進行同步WindowsGiteeGithub
- 使用scp命令在多個Linux系統間進行檔案複製Linux
- 檔案和檔案系統
- windows10系統開啟ex_file檔案的方法Windows
- Windows 10將可直接訪問Linux系統下的檔案WindowsLinux
- 幾種從Windows上傳檔案到Linux系統的方法WindowsLinux
- windows10系統怎麼開啟CRT檔案Windows
- linux的檔案系統Linux
- Mac的檔案系統Mac
- 使用ramdisk啟動ubuntu檔案系統Ubuntu
- win10系統如何清理c盤垃圾檔案 windows10清理c盤空間Win10Windows
- Linux系統中檔案時間常用的三種型別!Linux型別
- 檔案系統
- Windows 與 Linux (CentOS7) 之間的檔案共享WindowsLinuxCentOS
- Windows10系統檢視紅米手機檔案的方法Windows
- 透過HHDESK,將windows中的檔案轉移至Linux系統中WindowsLinux
- MySQL InnoDB系統表空間資料檔案配置MySql