diff --git a/Robocopy b/Robocopy new file mode 100644 index 0000000..d00b863 --- /dev/null +++ b/Robocopy @@ -0,0 +1,22 @@ +# Basic copy +robocopy \\SERVER01\C$\Logs C:\LocalLogs + +# Mirror a folder (exact copy, deletes extras at destination) +robocopy \\SERVER01\C$\WebApp C:\Backup\WebApp /MIR + +# Copy with logging +robocopy \\SERVER01\C$\Data C:\Backup\Data /E /LOG:C:\Logs\robocopy.log + +# Copy only changed files, retry on failure +robocopy \\SERVER01\C$\Data C:\Backup /E /Z /R:3 /W:5 + +# Useful flags +# /E = include subdirectories (including empty) +# /MIR = mirror (sync + delete) +# /Z = restartable mode (resume interrupted transfers) +# /R:3 = retry 3 times on failure +# /W:5 = wait 5 seconds between retries +# /LOG = write output to log file +# /NP = no progress (cleaner log output) +# /XF = exclude files, e.g. /XF *.tmp *.log +# /XD = exclude directories \ No newline at end of file