Robocopy copies data, but not the sharing informations

Posted on 2007-07-26
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
    LVL 30

    Expert Comment

    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.
    LVL 4

    Author Comment

    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

    by: - saving and restoring existing Windows shares.
    LVL 4

    Author Comment

    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

    Courses: Start Training Online With Pros, Today

    Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

    Join & Write a Comment

    Many of us in IT utilize a combination of roaming profiles and folder redirection to ensure user information carries over from one workstation to another; in my environment, it was to enable virtualization without needing a separate desktop for each…
    ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
    This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
    This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

    746 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

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now