robocopy file backup script

@echo off
REM /PURGE      :: delete dest files/dirs that no longer exist in source.
REM /XO         :: eXclude Older files.
REM /MT[:n]     :: Do multi-threaded copies with n threads (default 8).
REM /NDL        :: No Directory List - don't log directory names.

set ROBO_OPTS1=/E /PURGE /COPY:DAT /R:1 /W:5 /NS /NC /NFL /NDL /NP /MT /TEE /XD "RECYCLER" "System Volume Information" "$RECYCLE.BIN" "vaults"
set ROBO_OPTS2=/E /PURGE /COPY:DAT /R:1 /W:5 /NS /NC /NFL /NDL /NP /MT /TEE

robocopy \\192.168.21.32\G$ G:\ %ROBO_OPTS1% /LOG:D:\RoboCopy\Log\roboCopy-32-G-%DATE:~0,10%-1.txt
robocopy \\192.168.21.32\G$\vaults G:\vaults %ROBO_OPTS2% /LOG:D:\RoboCopy\Log\roboCopy-32-G-%DATE:~0,10%-2vaults.txt
robocopy \\192.168.21.32\E$ E:\ %ROBO_OPTS1% /LOG:D:\RoboCopy\Log\roboCopy-32-E-%DATE:~0,10%-1.txt

robocopy \\192.168.80.44\G$ N:\ %ROBO_OPTS1% /LOG:D:\RoboCopy\Log\roboCopy-44-G-%DATE:~0,10%-1.txt
robocopy \\192.168.80.44\E$ L:\ %ROBO_OPTS1% /LOG:D:\RoboCopy\Log\roboCopy-44-E-%DATE:~0,10%-1.txt
相關文章
相關標籤/搜索