http://ipmsg.org/tools/fastcopy.html.en
待續...
網路上提供 (文章引用於http://jojochen.blog.ithome.com.tw/post/2529/38855)
=====================================
FastCopy Command Line語法:
NET USE Z: \\NasNameA\ShareFolderA\SubFolder
fastcopy.exe /cmd=move /auto_close /estimate /logfile="D:\Log\SubFolder.txt" "\\NasNameB\ShareFolderA\SubFolder\*.*" /to="Z:\"
NET USE z: /delete
EXIT
以上存成bat檔後,再以Windows內附的排程工具設定定時執行即可。
----------------------------------------------------------------------------
增加了列出傳輸檔案名稱,存成以日期為檔名的txt文字檔備查日誌,避免使用者反應找不到檔案或者沒有接收到檔案,其語法如下(藍色粗體字):
NET USE Z: \\NasNameA\ShareFolderA\SubFolder
dir \\NaslNameB\ShareFolderB\SubFolder /s/b > d:\log\FileName%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%.txt
fastcopy.exe /cmd=move /auto_close /estimate /logfile="D:\Log\SubFolder.txt" "\\NasNameB\ShareFolderA\SubFolder\*.*" /to="Z:\"
NET USE z: /delete
EXIT
------------------------------------------------------------------------------------
使用資料同步選項sync,將一台NAS分享資料夾資料同步至另一台FreeNAS做D2D備份用途,並產生filelog檔,查看哪些檔案同步過去,包括被刪除的檔案以及花費時間等,撰寫批次檔語法如下:
fastcopy.exe /cmd=sync /auto_close /estimate /filelog=d:\log\sync-files.log "\\NAS\ShareFolder\*.*" /to="\\FreeNas\ShareFolder"
exit
在D:\log資料夾產生的sync-files.log內容如下:
FastCopy(ver2.08) start at 2011/09/27 11:10:55
<Source> \\NAS\ShareFolder\*.*
<DestDir> \\FreeNas\ShareFolder
<Command> Sync (Size/Date)
+ \\FreeNas\ShareFolder\新增文字文件.txt
==================================================
自己diy
======================================
NET USE Z: \\192.168.4.28\nas28 /user:帳號 密碼
"C:\Program Files\FastCopy\FastCopy.exe" /cmd=diff /auto_close /estimate /logfile="C:\Documents and Settings\Administrator\桌面\FastCopy208\Log\LogSubFolder.txt" "E:\nas28\*.*" /to="Z:\"
NET USE z: /delete
EXIT
======================================
我是做差異備份!
連網路磁碟機(要備至另一到nas),
執待fastcoy執行檔,差異備份,自動關閉,log存放路徑(看log成功失敗等),
要備份的資料匣路徑,備份到一開始連線的z槽,
關閉z槽網路磁碟機,
離開。
----------------------------------------------
Command Line說明檔於檔案解壓縮後的FastCopy.chm此檔
Diff (No Overwrite) Copy if the same filename doesn't exist in destination.
如果目標資料夾沒有相同的檔案時則複製
Diff (Size/date) Copy if size or date is different, or if it doesn't exist (in default)
如果檔案不存在或者是大小以及尺寸不相同則複製(預設值)
Diff (Newer) Copy if source file timestamp is newer or doesn't exist.
檔案不存在,或者是原始檔案的時間比較新的話則複製
Copy (Overwrite all) Always copy/overwrite all.
不管怎樣都複製以及覆蓋
Sync (Size/date) Copy
if size or date is different, or doesn't exist. In addition, delete all
destination files/directories that don't exist in source.
如果目標資料夾檔案時間與大小不同、或者市不存在則複製,除此之外,會刪除目標資料夾裡面不存在於來源資料夾的檔案,也就是同步兩個資料夾的意思
Move (Overwrite all) Always
copy/overwrite all and delete all copied source files. (It is able to
change "Move (Overwrite all)" -> "Move (Size/date)" in settings
dialog.)
搬運檔案,也就是複製完畢之後來源資料夾會被清空
Delete Delete all files/dirs by force.
刪除檔案
沒有留言:
張貼留言