酷!學園
2010-09-03 13:15 *
歡迎光臨, 訪客. 請先 登入註冊一個帳號.
您忘了 啟用您的帳號嗎?

請輸入帳號, 密碼以及預計登入時間
新聞:
 
   首頁 | Study-Area | 鳥園 | 鳥哥的Linux私房菜   說明 搜尋 日曆 登入 註冊  
頁: [1]
  列印  
作者 主題: [分享][教學] 使用 cwRsync 差異性備份 Windows 伺服器  (閱讀 4389 次)
0 會員 以及 1 訪客 正在閱讀本篇主題.
appleboy
活潑的大學生
***
文章: 207



檢視個人資料 個人網站
« 於: 2007-04-04 12:07 »

其實是因為看到這篇 [筆記] cwRsync (rsync for win32) SSH 加密異地備份

最近正在弄Windows的機器怎麼跟Windows的機器互相備份,linux跟windows之間麼備份已經搞定了,其實我差不會利用windows的每天固定跑程式,在linux底下可以使用cron的方式來用,可是winodws底下就要使用批次檔。

再來就是安裝步驟,請把2台windows的機器都裝上 cwRsync

假設已經安裝好 cwrsync 之後,在系統服務那邊 把他啟動之後,就可以開始使用了

底下是網路上抓好的 清除你系統中沒必要的垃圾檔案

請打開記事本…

打入以下東西

程式碼:
@echo off
echo 正在清除系統垃圾檔案,請稍等……
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.gid
del /f /s /q %systemdrive%\*.chk
del /f /s /q %systemdrive%\*.old
del /f /s /q %systemdrive%\recycled\*.*
del /f /s /q %windir%\*.bak
del /f /s /q %windir%\prefetch\*.*
rd /s /q %windir%\temp & md %windir%\temp
del /f /q %userprofile%\cookies\*.*
del /f /q %userprofile%\recent\*.*
del /f /s /q “%userprofile%\Local Settings\Temporary Internet Files\*.*”
del /f /s /q “%userprofile%\Local Settings\Temp\*.*”
del /f /s /q “%userprofile%\recent\*.*”
echo 清除系統LJ完成!
echo. & pause


儲存...副檔名.bat

不過先設定 rsync.conf



請注意 在windows底下 都是利用



程式碼:
# Module definitions
# Remember cygwin naming conventions : c:\work becomes /cygwin/c/work


路徑不要打錯,然後在打開剛剛寫好的bat檔案,加入底下



程式碼:
@cls
@echo off
rem Rsync job control file
path=C:\Program Files\cwRsyncServer\bin;%path%
rsync -avl --delete --progress --password-file=d:\backup\rsync.txt /cygdrive/d/backup appleboy@192.168.100.5::backup_NAS
echo. & pause


重點是底下這行

程式碼:
path=C:\Program Files\cwRsyncServer\bin;%path%


path要設定好,不然系統會跟您說找不到指令,其實這在linux砥也會常常遇到

這樣就可以了,然後在 開始->控制台->排定工作  新增一個排程 這樣就可以了



參考:

Rsync for Windows
[Linux] cwRsync [rsync for windows] SSH 加密異地備份

資料同步於部落格˙

http://blog.wu-boy.com/2007/04/03/89
已記錄


歡迎來到 CodeIgniter 繁體中文討論區
My Blog:小惡魔 - 電腦技術 - 生活日記 - 美食介紹 - AppleBOY
美國職棒影片網站:http://mimi.twgg.org/
頁: [1]
  列印  
 
前往:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
本頁花了 0.055 秒,以及 15 次的資料庫查詢。