使用免費的軟體 Cwrsync 做異地備份 Windows to Windows
Backup Server Windows2008
Client WinXP
下載網址:http://www.itefix.no/i2/cwrsync
Server端安裝程式:cwRsyncServer_4.0.2_Installer
Client端安裝程式:cwRsync_4.0.2_Installer
一、.Win2008Server上
1.滑鼠雙擊[cwRsyncServer_4.0.2_Installer],安裝畫面如下
2.要點選我同意,才能繼續下一個步驟
3.程式安裝的路徑目錄
4.設定帳號與密碼(目前設了還用不到
5.安裝完成後,點選Close按鈕
6.接者點選[開始]=>[所有程式] =>[cwRsyncServer]=>[rsyncd.conf]開啟此檔修改
[rsyncd.conf]內容如下:
uid = 0
gid = 0
use chroot = false
strict modes = false
hosts allow = *
log file = rsyncd.log
# Module definitions
# Remember cygwin naming conventions : c:\work becomes /cygwin/c/work
#標籤名稱--一定要輸入
[backup]
#預上傳的檔案路徑如下:c:\backup
path = /cygdrive/c/backup
#開啟可以上傳權限
read only = false
transfer logging = yes
PS:rsyncd預設的port號為873,記得防火牆要開才能ㄛ(當然也可以更改port號
7.進入[服務],將RsyncServer設定為自動,並且[啟動]此服務
二、Client端WinXP
1.滑鼠雙擊[cwRsync_4.0.2_Installer],既可安裝完成。(圖片就不附上來
2.開啟檔案總管[C:\Program Files\cwRsync]=>[cwrsync.cmd]滑鼠右鍵點編輯(只要是文字編輯器都可以,主要是輸入紅色字體部分如下所示:
...
......
.........
REM Rsync is a very powerful tool. Please look at documentation for other options.
REM
REM ** CUSTOMIZE ** Enter your rsync command(s) here
rsync -avrtzu /cygdrive/d/CCNA 192.168.2.6::backup
說明:將本機(WinXp)D:\CCNA資料夾內的資料全部上傳到Win2008Server上的backup標籤內。
/cygdrive/c--代表C槽
/cygdrive/d--代表D槽。依此類推
*執行的時候發現找不到指令,請到環境變數內Path 將 C:\Program Files (x86)\cwRsync\bin 加入
有關rsync指令說明如下:
-a, --archive mode; equals -rlptgoD (no -H,-A,-X)
-v, --verbose increase verbosity
-r, --recursive recurse into directories
-t, --times preserve modification times
-z, --compress compress file data during the transfer
-u, --update skip files that are newer on the receiver
3.接者直接點擊[cwrsync.cmd]就可以備份上去囉,你可以再用WinXP內附的排程程式固定時間去執行就可以囉。
4.別忘記去Server端查看檔案是否有上傳。
Q&A
Q:Connection refused (111)
A:873防火牆沒開,才會出現此問題。