Robocopy copies data, but not the sharing informations

Posted on 2007-07-26
Medium Priority
Last Modified: 2010-03-17

I will soon need to move a file server server to a new one and will have to move data, permissions, file shares etc.

I can use RoboCopy for that, but it seems that robocpy doesn't copy the file shares.
Some subdirectories are shared and after using RoboCopy to copy the file shares, the directories are not shared on the destination directory while they are on the source directory.

I use this command-line

RoboCopy.exe "D:\Backup" "\\testsrv\d$\testshare" "*" /R:0 /W:0 /S /E /ZB /COPYALL /FFT /TEE /V /FP /ETA

I have seen the scopy tool which can apparently copy files shares but seems less reliable than RoboCopy for the copying task.
Doesn't anybody know a software doing the both tasks in one tool, or method to make RoboCopy share the directories on the destination server as well ?

Thanks in advance,
Question by:Vorenus
  • 2
  • 2
LVL 30

Expert Comment

ID: 19574388
Robocopy will not create or manage file shares.  Your best bet is to incorporate the 'net share' command into the batch file that you're running robocopy from.

Author Comment

ID: 19574515
Thank you Laura...
Argh, Robocopy would have been perfect if it could have done that !
The problem with net share, I will create new shares that may not have the same permissions ?
Or am I missing something ?

I noticed that in the registry, this key seems to hold my shares, will it work.
which should enable me to export this as a reg, amend my paths using search and replace.

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\lanmanserver\Shares\Security seems to hold the security details for the share, but it is binary value.
Is it reliable to export this as a reg file and merge it on the new server once my robocopy will have finished ?
LVL 30

Accepted Solution

LauraEHunterMVP earned 2000 total points
ID: 19574539
http://support.microsoft.com/?kbid=125996.asp - saving and restoring existing Windows shares.

Author Comment

ID: 19574583
Thank you Laura, it confirms my theory.

If you don't mind, I will keep the question open for a few more hours to wait if someone comes up with a software name that can do both copy and file share restoring at once and give you the points if I haven't have any other helpful answer.



Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's recap what we learned from yesterday's Skyport Systems webinar.
Wouldn't it be nice if objects in Active Directory automatically moved into the correct Organizational Units? This is what AutoAD aims to do and as a plus, it automatically creates Sites, Subnets, and Organizational Units.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question