• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 511
  • Last Modified:

Robocopy from Windows 2003 to Windows 2008 servers


We are moving our file servers from Windows 2003 to Windows 2008. We are using robocopy to move about 4TB of data. We are using this command to do copy..

robocopy "\\fileserver\files" "E:\files" /S /E /SEC /COPYALL /MIR /Z /V /NP /LOG+:"c:\log\files.log" /Z /R:1 /W:1

this works in copying data and ACL everything.. but now I want to just copy new and changed files and folders and I want to merge ACL from the old file and new ACL we have setup on new file server. Currently it is removing New ACL we have setup on new server.
  • 2
2 Solutions
You need the:

/MON:x [x number of changes]

Keep your existing script and add the switch above, might need to restart the copy activity.

You can also use the:

/MAXLAD:n :: MAXimum Last Access Date - exclude files unused since n.
/MINLAD:n :: MINimum Last Access Date - exclude files used since n.
             (If n < 1900 then n = n days, else n = YYYYMMDD date).

To identify and back up only files that have changed since last copy.

I also prefer to use /ZB as opposed to just /Z
/s is redundant if you're using /e; when using /mir, /e is redundant as well, because /mir is the same as /purge and /e.
/sec is redundant if you're using /copyall, because /copyall includes security.
If your copy works with /r:1 /w:1, it means you have a stable connection, so you won't need /z; /z slows down the copy because of the additional overhead. /z is mainly required if the connection is unstable and the files to copy are rather large.
That said, if you don't want to copy permissions anymore, drop the /sec and the /copyall (and/or replace them with /copy:DAT, which is the default if nothing else is specified).
Note that robocopy will by default only copy files that re new or changed (based on file size and time stamp).
So change your command like that:
robocopy "\\fileserver\files" "E:\files" /copy:DAT /MIR /V /NP /LOG+:"c:\log\files.log" /R:1 /W:1

Open in new window

stghelpdeskAuthor Commented:
So you  saying think I my original script should have been.

robocopy "\\fileserver\files" "E:\files"  /COPYALL /MIR /Z /V /NP /LOG+:"c:\log\files.log" /Z /R:1 /W:1

This for my next server move. So my first copy will have all ACL and files and Folders.
Your first command was basically OK, it just had some redundancy to it. Robocopy doesn't care, but it can be confusing if you're using "/sec /copyall", then leave out the /sec, and wonder why permissions are still copied.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

We Need Your Input!

WatchGuard is currently running a beta program for our new macOS Host Sensor for our Threat Detection and Response service. We're looking for more macOS users to help provide insight and feedback to help us make the product even better. Please sign up for our beta program today!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now