Send mail to the author(s) E-mail

# Monday, 04 August 2014

To make an easy incremental backup to a network share:  Create a robo.bat file, then call it form scheduled tasks every day.

REM Where:
REM /e = copy all sub-folders, even empty ones
REM /mir = mirror (check the files in the destination, and only copy newer files)
REM /np = no progress counter
REM /log: = create a logfile
REM /tee log file and command window
REM /z network - retry for copying
REM /mt multithread

cd "\Program Files\"

robocopy d:\work\ y:\work\ /e /mir /np /z /tee /mt /log:"d:\temp\robo.log"
robocopy c:\temp\ y:\temp\ /e /mir /np /z /tee /mt /log+:"d:\temp\robo.log"

::Copy selected files from A: and B: to X: using Robocopy ::20130624 Added /MT switch ::20130404 Added delete for older Veeam files. ::20130326 Changed source for Exchange from A to B. Added IT back in. ::20120318 Updated to include only vbk files and Exchange directory, exclude IT. ::Last updated on 20130118 by Martin Peverley ::20130211 Updated date format of log file to YYYY-MM-DD :: ::Switches: ::(E)mpty folders included in copy ::(R)etry each copy up to 15 times ::(W)ait 5 seconds between attempts ::(LOG) creates log file ::(NP) do not include progress txt in logfile; this keeps filesize down ::(MIR)rors a directory tree ::(MT[:n]) Do multi-threaded copies with n threads (default 8). ::Source path ::set sourcepath=E:\Backups ::Destination path ::set destinationpath=F:\Backups ::Log path set logpath=Z:\Logs\Robocopy\ ::Include format in log filename set filename=Weekly-v2_%date:~-4,4%-%date:~-10,2%-%date:~-7,2%#%time::=-%.txt ::Run command ::robocopy %sourcepath% %destinationpath% /E /R:15 /W:5 /LOG:"%logpath%%filename%" /NP /MIR ::Delete older Veeam backups if existing del "x:\Veeam\File\*.*" /Q del "x:\Veeam\Exchange\*.*" /Q del "x:\Veeam\Daily Backup Job\*.*" /Q robocopy "A:\Veeam\Daily Backup Job" "X:\Veeam\Daily Backup Job" *.vbk /MAXAGE:7 /E /V /ETA /COPYALL /R:0 /W:0 /NP /MT /LOG:"%logpath%%filename%" /TEE robocopy "A:\Veeam\File" "X:\Veeam\File" *.vbk /MAXAGE:7 /E /V /ETA /COPYALL /R:0 /W:0 /NP /MT /LOG+:"%logpath%%filename%" /TEE robocopy "B:\Veeam\Exchange" "X:\Veeam\Exchange" *.vbk /MAXAGE:7 /E /V /ETA /COPYALL /R:0 /W:0 /NP /MT /LOG+:"%logpath%%filename%" /TEE robocopy "B:\IT" "X:\IT" /MIR /V /ETA /COPYALL /R:0 /W:0 /NP /MT /LOG+:"%logpath%%filename%" /TEE robocopy "B:\email archives" "X:\email archives" /MIR /V /ETA /COPYALL /R:0 /W:0 /NP /MT /LOG+:"%logpath%%filename%" /TEE



| | #