Make backup script with robocopy for Windows

Mirror the directories (source & destination exactly the same)

robocopy \\SourceServer\Share \\DestinationServer\Share /MIR /FFT /Z /XA:H /W:5 /MT /NP /LOG:C:\location\log.txt


/MIR specifies that robocopy should mirror the source directory and the destination directory. Note that this will delete files at the destination if they were deleted at the source.



/FFT uses fat file timing instead of NTFS. This means the granularity is a bit less precise. For across-network share operations this seems to be much more reliable – just don’t rely on the file timings to be completely precise to the second.


/Z ensures robocopy can resume the transfer of a large file in mid-file instead of restarting.


/XA:H makes robocopy ignore hidden files, usually these will be system files that we’re not interested in.


/W:5 reduces the wait time between failures to 5 seconds instead of the 30 second default.



/MT Multi-threaded (default is 8)


/NP No percentage 





Leave a Comment

Your email address will not be published. Required fields are marked *