Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving directory with security rights

Status
Not open for further replies.

bkoopers

IS-IT--Management
Apr 26, 2005
86
0
0
US
I need to move a large directory structure from a Windows 2000 server to a Windows 2003 server. The sub-directories under the main directory each have different security rights. How can I move the entire structure and maintain all the security rights (so all Active Directory groups will have the same rights to the same directories now in the new location)? I am hoping to avoid the tedious process of re-assigning all the security rights once the directory structure has been moved.

Thanks to anyone who can help me out.
 
Thanks.

Should I actually use the "/COPYALL" switch which is described as "COPY ALL file info (equivalent to /COPY:DATSOU)"?

I want to move the "Share" directory structure from a Windows 2000 server to a Windows 2003 server both in the same domain. These are the source and destination locations:

From:
\\gacnyw2k1\Share_root\Share

To:
\\gacnyw2k4\Data\share

I want everything under "Share" to be copied under "share".

Would this be the correct syntax?

ROBOCOPY \\gacnyw2k1\Share_root\Share \\gacnyw2k4\Data\share /COPYALL
 
I honestly haven't used it in ages test it and see what result you get, if you can't sort it i'll give it a try over here. There should be a Robocopy.doc file along with the exe that will explain all of the switches.
 
I tried a small test and it was successful. I then tried it with the following syntax for a large 38 gb directory structure:

robocopy "\\gacnyw2k1\Share_root\Share\Military" "\\gacnyw2k4\data\Military" /COPYALL /S /E

After about two hours it got stuck copying a file and displayed an "ERROR 5, Access is denied", "Waiting 30 seconds ... Retrying". It kept repeating this sequence and never continued so I had to cancel the command. I logged into another computer and checked that file and it was not in use (no users were accessing any files in the entire directory structure). From this other computer, I moved that sub-directory containing that file outside the source structure, deleted the partially copied structure and started the ROBOCOPY command again. It will take hours until I know if it is successful or gets stuck elsewhere.

I was logged in with full administrator rights to all files on both computers so it was not a rights issue and no user was locking the file. If it was really locked, I would not have been able to move that file.

Can anyone explain why this error occurred and what can be done to prevent it from stopping ROBOCOPY again?
 
There is an explanation in this thread.



If you still cant get it too work there is another method that i've used before with success. Use Windows backup and backup all of the data to a .bkf file (a windows backup file) then redirect the restore to the new location.
 
The second attempt of copying using ROBOCOPY got stuck with the same "ERROR 5, Access is denied" this time after 7 hours and copying 28 gb of the 38 gb. The file it could not copy was "AUTORUN.INF". The file it could not copy the first time was "ActEvent.ocx" (a file that is part of an "Act! contact manager program database). I read the explanation of "ERROR 5" at and perhaps the problem is that I was logged in with only administrator rights and not "Domain Admin" or logged in as a "service" as backup programs can be.

It appears that using ROBOCOPY is too slow to copy that many files (or that size of files) anyway since it took 7 hours and only completed 75% of the copying.

Does "Windows backup" retain the "Security rights" when restoring to a new location as ROBOCOPY does?

I am also going to investigate if Computer Associates ARCserve BrightStor Backup (the program that I use on the servers) can be set to retain the "Security rights" when restoring to a new location. I think a backup and restore via the tape system will run much faster than ROBOCOPY for that large a job.
 
Windows backup will retain NTFS permissions but ArcSERV will as well, restoring a copy of the folders from tape should acheive what you want.
 
I used robocopy extensively a couple of year ago when I was doing a Server 2003 migration across about 30 servers. We were copying anything up to 100Gb from external USB2 drives across a gigabit LAN, and I seem to remember the longest copy took around 4-5 hours.

I always found it reliable, but the speed of the copy was dependant on the server hardware and LAN config. If possible keep the servers on the same subnet (and the same switch if possible) and make sure to manually fix the speed/duplex settings on the switch and server.

I also noticed you said you deleted the failed copy, there is a way you could have avoided having to do this. The /MIR switch will produce an exact mirror of the source on the destination, and will skip any files which already exist.

WARNING - Be very careful when using the /MIR switch can also delete files. If you are copying to an existing folder, any folders or files that do not exist in the source location will be deleted.
 
Both servers are on the same subnet and connected to the same Cisco Catalyst 4006 Switch. I would need to get some assistance to "manually fix the speed/duplex settings on the switch and server" (if that would be needed).
 
Generally leaving NIC and switch port speed and duplex setting on Auto shouldn't be a problem. But it's always a good idea to fix them manually as it can improve performance and it's also one less thing that can potentially cause problems.

I've got very little experience of configuring Cisco switches so wouldn't want to advise how to make the changes, but I know that it's a simple task. On the server side it's simply a matter of opening the properties page of the LAN connection and clicking the Configure button. Go to the Advanced tab and selecting the Speed/Duplex from the dropdown menu.

In case you're not aware, when you change these setting on the server and the switch, the connection will be dropped for a few seconds.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top