Robocopy: Tips From 10 Years of File Server Replacements

No Not That Type of File

I can vouch for Robocopy. I've been using it for at least a decade, and it's the ONLY way I migrate/copy file shares. I've used it for dozens of file server replacements in all sorts of scenerios. It's never let me down, even with TBs of data over slow WAN links. It has so much flexibility. Here's what you need to know:

  1. It's built into windows going back to 2008, and in the 2003 Resource Kit.
  2. Normally command-line only, which is a good thing. There is a GUI, but I've never used it. Most commands take only a few minutes to create and I run from a Batch file so I can rerun it over and over.
  3. Even when moving small amounts of file server data, I never recommend using Explorer GUI which is slower, and ripe with permissions/ownership issues and prompts. Explorer has no testing, logging, or autoretry.
  4. Always test to ensure you're getting the results you expect. /L
  5. I usually run it from the server I'm copying from. It's faster that way when dealing with 100k+ files vs. running from server I'm going to. Expecially when using multiple passes.
  6. Never copy someone elses command line and use it. Way too many switches that can cause you to lose data. With much power comes much responsibility. /? gives you lots of info.
  7. I tend to run it over many passes. So for a migration of 500GB of file server data, I'll start the first copy days/weeks before the go-live on new server. Each time I run it (depending on switches) it'll only copy updated files... making the copies faster and faster each time. On go-live day, it'll only copy the files changed that day.
  8. Newer versions even have options for entering delay, to prevent from saturating WAN links. /IPG
  9. In newer versions, mutithread is on by default (8 threads). /MT
  10. It will retry by default if file is open, and often will retry way to many (2012 R2 retry default is one million) so I always set it to 10 or something reasonable /R
  11. Use restartable if using large files over slow links, so if things get interrupted, it can start where left off. /ZB
  12. It's easy to throw the command in a Batch file (with proper logging options) and put in Scheduled Task for running even when you're not logged in (good for multi-day operations).