Link to home
Start Free TrialLog in
Avatar of MCloud1983
MCloud1983

asked on

Robocopy Doesn't Retain Shared Folders After Copying

I had this question after viewing Robocopy - Copy the contents of a Windows 2003 File Server with all of its permissions to a 2012 Windows Server.

Via Robocopy the root folders were copied along with the Security permissions, but the folders that were initially listed as shared were not shown as shared after using Robocopy.  How can folders initially listed as shared maintain their shared feature after using Robocopy?  Thanks.
Avatar of Scott C
Scott C
Flag of United States of America image

What command are you using?

Try this:

ROBOCOPY "\\oldservername\sharelocation" "\\newservername\newsharelocation" /MIR /SEC /LOG:location:\logfilename

The last part is optional (/LOG:location:\nameoflogfile), but it's always useful to have a log file.
ASKER CERTIFIED SOLUTION
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
To add to Lee's comment, see his post here for the registry location and other tips: https://www.experts-exchange.com/questions/28685070/copy-from-old-server-to-new-server.html?anchorAnswerId=40811294#a40811294
Avatar of MCloud1983
MCloud1983

ASKER

ScottCha, I used the following command: robocopy \\servername\e$ e:\ /np /r:1 /w:1 /copyall /e /mir /dcopy:t log:c:\robocopy.txt.  So, what you're proposing doesn't solve my issue.  I'll look into Lee's and NVIT's suggestion.
Lee is correct now that I think about it.  Every time I've used Robocopy to move files from an old server to a new one, I've always had to recreate the shares.  Permissions will stay in place but not the shares.

The reg export/import looks like the way to go for you.