Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 275
  • Last Modified:

Moving shared folders

I am running Windows Server 2003 R2, and wanting to know if there is a way to move shared folders that are under drive D to another drive E without loosing all the share and security permissions?
0
jvillareal78
Asked:
jvillareal78
  • 3
  • 3
  • 2
3 Solutions
 
brutaldevCommented:
From a command prompt run the following:
 
XCOPY "D:\*.*" "E:\" /E /I /K /X

Open in new window


/E = Copy everything including empty directories
/I = Assume destination is a directory
/K = Copy all existing file attributes (read-only etc)
/X = Copies all audit settings (implies /O which copies ownership and ACL info) <- this is mainly what you want
0
 
ronnypotCommented:
Hi,

For the files you can use robocopy its part of the 2003 resource kit which you can download here: http://www.microsoft.com/downloads/en/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en

Here http://technet.microsoft.com/en-us/library/cc733145(WS.10).aspx you can find all option you can use, when you use /copyall it copies also security, owner and auditing information. And the /move options moves the files in stead of only do a copy.

So the copy would be something like:
robocopy d:\folder e:\folder /s /e /copyall /move

The shares will not be copied so you have to change them manually I have seen manners to do it to another server but not to change to another partition, are we talking about a lot of shares here?
0
 
brutaldevCommented:
I opted for XCOPY because of Windows 2003 and avoiding getting the resource kit, otherwise ROBOCOPY would be the right choice. The XCOPY options I provided will work correctly, you can verify the copies and simply delete the contents of D: when you are happy.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
ronnypotCommented:
Xcopy will work but it adds the objects permission to the inheritable permissions already given from  the existing parent folder.
Robocopy just copy's the permissions and replaces the original parent folder permissions.

read here http://support.microsoft.com/kb/310316 for details
0
 
brutaldevCommented:
Cool, I actually did not know that.
0
 
jvillareal78Author Commented:
I have 9 shared flders under our D drive, our company has about 150 people so alot of users and about 10 groups. So if there is a way to preserve the shares with user and groups settings that would be wonderful.
0
 
ronnypotCommented:
Copy the data with robocopy (or xcopy) when finished open the registry and goto [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet\Services\lanmanserver\Shares] here you see all your shares and edit the driveletter for those share. (Ofcourse make sure you make a backup before you start editing the registry). When finished restart your server and the shares should be on the new place.

0
 
jvillareal78Author Commented:
Using Robocopy, and editing the Registry worked 100%, the only waiting was copying the files over. Thank you
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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