Solved

robocopy for file server migration

Posted on 2014-01-10
11
47 Views
Last Modified: 2016-06-01
I've got an antiquated windows 2003 R2 file server and have configured a new 2008 R2 VM to serve as the new file server.  Been using Robo Copy to migrate shares to the new server.  It's an efficient tool.

The only problem I'm running into are some problem directories in shares yielding an 'access is denied' in robocopy.  The odd thing is I'm using a domain admin account and the same account not only has full control over the directory, subdirectories, and files but is also the owner of all these objects.

This is only happening for a very small sample size of the data being migrated.

Just curious if anyone has run into this before.  I'm a little stumped as to why an owner of a file or folder would have difficulty copying.  Permissions on the destination drive are full control as well for the user.
0
Comment
Question by:isroccanoub
11 Comments
 
LVL 9

Assisted Solution

by:Beartlaoi
Beartlaoi earned 100 total points
ID: 39771769
If someone has the file open in a non-sharing mode, that will also give that error.
Have you tried /B or /ZB ?
Another way is to use a shadow copy, I can give more details on that if needed.
0
 
LVL 30

Assisted Solution

by:pgm554
pgm554 earned 100 total points
ID: 39771828
Use Shadowcopy from Runtime.org

It uses VSS

http://www.runtime.org/shadow-copy.htm
0
 
LVL 9

Assisted Solution

by:rawinnlnx9
rawinnlnx9 earned 200 total points
ID: 39771944
Don't use robocopy. Use the DOS XCOPY it's RAD and it continues even if an error happens. You cannot control the errors but I think at the end it lists files that were not copied.

Here is an example. I'm suppressing the process so that it does not show files being copied.

C:\Users>xcopy /E/C/I/Q/R/ *.* C:\Source\

Now I think you can actually output the list of source and destination to a text file using the  > character. Robocopy was a huge let down for me.

C:\Users>xcopy /?
Copies files and directory trees.

XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W]
                           [/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U]
                           [/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z] [/B]
                           [/EXCLUDE:file1[+file2][+file3]...]

  source       Specifies the file(s) to copy.
  destination  Specifies the location and/or name of new files.
  /A           Copies only files with the archive attribute set,
               doesn't change the attribute.
  /M           Copies only files with the archive attribute set,
               turns off the archive attribute.
  /D:m-d-y     Copies files changed on or after the specified date.
               If no date is given, copies only those files whose
               source time is newer than the destination time.
  /EXCLUDE:file1[+file2][+file3]...
               Specifies a list of files containing strings.  Each string
               should be in a separate line in the files.  When any of the
               strings match any part of the absolute path of the file to be
               copied, that file will be excluded from being copied.  For
               example, specifying a string like \obj\ or .obj will exclude
               all files underneath the directory obj or all files with the
               .obj extension respectively.
  /P           Prompts you before creating each destination file.
  /S           Copies directories and subdirectories except empty ones.
  /E           Copies directories and subdirectories, including empty ones.
               Same as /S /E. May be used to modify /T.
  /V           Verifies the size of each new file.
  /W           Prompts you to press a key before copying.
  /C           Continues copying even if errors occur.
  /I           If destination does not exist and copying more than one file,
               assumes that destination must be a directory.
  /Q           Does not display file names while copying.
  /F           Displays full source and destination file names while copying.
  /L           Displays files that would be copied.
  /G           Allows the copying of encrypted files to destination that does
               not support encryption.
  /H           Copies hidden and system files also.
  /R           Overwrites read-only files.
  /T           Creates directory structure, but does not copy files. Does not
               include empty directories or subdirectories. /T /E includes
               empty directories and subdirectories.
  /U           Copies only files that already exist in destination.
  /K           Copies attributes. Normal Xcopy will reset read-only attributes.
  /N           Copies using the generated short names.
  /O           Copies file ownership and ACL information.
  /X           Copies file audit settings (implies /O).
  /Y           Suppresses prompting to confirm you want to overwrite an
               existing destination file.
  /-Y          Causes prompting to confirm you want to overwrite an
               existing destination file.
  /Z           Copies networked files in restartable mode.
  /B           Copies the Symbolic Link itself versus the target of the link.
  /J           Copies using unbuffered I/O. Recommended for very large files.

The switch /Y may be preset in the COPYCMD environment variable.
This may be overridden with /-Y on the command line.

C:\Users>xcopy /E/C/I/Q/R/ *.* C:\Source\

Open in new window

0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 

Author Comment

by:isroccanoub
ID: 39772490
thanks for the responses.  this is something I'll be digging into mid next week.  I'll post the solution used once we get there.
0
 
LVL 54

Expert Comment

by:McKnife
ID: 39773471
Where are you using it at? ON 2008 or 2003? On 08, you have UAC, so dom admins are not treated as members of the administrators group until they elevate.
0
 
LVL 77

Assisted Solution

by:arnold
arnold earned 100 total points
ID: 39773545
Windows 2003 r2 and newer system can use DFS-replication

Make sure to use the windows 2003-R2 as the basis of the DFS-replication group this way the data will be copied along with the permissions/ownership from the 2003 r2 to the windows 2008.

Note further than updates on the 2003 R2 will be propagated automatically when the file is closed.
Redefining the share as a DFS share, will provide for a seamless transition in the future.
Setting up referral as a failover (one node primarily, the other on failure) will deal with issues where only one person can edit a file at a time.

Preconfigure the destination directory on the windows 2008 with the appropriate ownerships.
The setup is a two minute process and you are done.
0
 
LVL 9

Assisted Solution

by:rawinnlnx9
rawinnlnx9 earned 200 total points
ID: 39773695
Oh yeah that reminds me of this tool... It's nifty. I actually have used it in many, many situations especially if DFS isn't an option.

http://www.microsoft.com/en-us/download/details.aspx?id=15155
Microsoft SyncToy. It's a UI it's pretty slick.
0
 

Accepted Solution

by:
isroccanoub earned 0 total points
ID: 39789839
These are all interesting alternatives.  For the present, I remain committed to migrating the file server in a homogenous manner (i.e. continue with robocopy).

Robocopy has largely worked seamlessly; 11 shares, in excess of six million files, nearly 6 TB of data.  The copies have been smooth and fast.

Again, the only problems I've run into are with the 11th share and some subfolders within (e.g. users>employee name>subfolders>files).  I have set myself to be the owner at the 'employee name' level as well as having full control for all subfolders and files.  Despite being an owner with FC, I am unable to copy the files to a new volume (i.e. with right click copy and paste or robo copy).  Access is simply denied, it's puzzling, and something I've not encountered previously.

With some research, I believe I have found the solution.

In the first failing instance, the UNC path length is exceeding 255 characters.  I have migrated these target subfolders to the root of the share and they are now copying as expected.

The second failing instance involved a user with a linux vm using samba to backup his SVN database to the windows file server.  In this case, the user has a local copy so it's something that can be trued up once the new file server is operational.

Whether or not this research is truly correct, the applied solutions are going to meet the project's ultimate goals.
0
 
LVL 9

Expert Comment

by:rawinnlnx9
ID: 39789883
That's actually pretty sound. I think you've tracked down your bugs. The 255 char limit is extremely irritating and I'm surprised that Robocopy didn't provide you with more feedback regarding the errors.

Glad that you do have it working though. I think down the road you should implement a DFS system. Then this task will be forgotten and it won't consume more time than it takes to set up the DFS and let it replicate.

Good on you for solving your own problem.
0
 

Author Comment

by:isroccanoub
ID: 39789951
DFS is the list to implement.  thanks to all for your input.  It's always educational to absorb all the different means/ideas to the same end.
0

Featured Post

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

This article covers how to install the Microsoft Windows Operating System (OS). What is covered in this article:  > Different Versions and Editions of the Windows OS  > Upgrading versus Fresh Installation of the OS           - Steps to take pr…
Have you ever had a hard drive that you can't boot into, but need to change the registry? Here is the solution! This article guides you through accessing and editing a registry of a non-primary drive. To read registry information on a non-prim…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

770 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