I am looking to speed up my deployment process, currently I have a single staging server, and a web-farm in production.
I currently use robocopy
to mirror each web-farm server from the staging server, however, this is very slow.
My copy command looks as follows
ROBOCOPY %codeSourceDir% %targetSite% /MIR /XF *.config
Which is to mirror the folders, excluding any *.config
files.
This behaves properly, but to copy 200 mb of files to 8 servers, it takes roughly 4 minutes per server (~30 minutes total). If I do a simple delete folder and copy using remote-desktop, it finishes in about 5 seconds! The reason why I think the difference is so large is there are a lot of files (~10 thousand), and most of the time spent by robocopy is the comparison of files.
Is there a way to speed up robocopy, by ignoring the file-compare feature?
What I'm looking to do is to mirror directories (basically, delete the extra files), I do not care if I overwrite files that are the same. Can robocopy do this, or is there a better tool for the job?