[Webinar] Learn how to a build a cloud-first strategyRegister Now

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

I need to move data from one server to the NetApp filer. I tired using ROBOCOPY Evrything came up good except ownership information.

I need to move data from one server (EMC NAS) to the NetApp filer. I tired using ROBOCOPY with /E and  /DCOPY:T switch. It copied the permissions and the timestamp correctly but could not copy the ownership information. I have full control of the share both at source and at target, but when I copy the folders it makes me the owner of the folder and removes the original owner's name. switch COPY:O does not work . Any help is highly appriciated.
0
Info985
Asked:
Info985
  • 10
  • 8
  • 6
1 Solution
 
tenaj-207Commented:
The switch you want is /COPYALL.  That will copy all associated tags with the files.

I would run;
robocopy \\server\share \\nas\share /E /copyall /R:1 /W:3 /V /log:c:\output.txt

I also like to specify everything (e) the retry (r) the verbose level (v) and a out put log.  So it'd look like this.  That means it'd copy everything, only retry once (the default is some ridiculously high number) and wait time between retrys is 3 sec and the verbosity is set to high.  Lastly I can review the log to confirm that it got everything.

Hope that helps,
tenaj
0
 
Info985Author Commented:
It gave me the error : 1307 "Copying NTFS Security to Destination Directory. This security ID may not be assigned as the owner of this object"
Please help!
0
 
tenaj-207Commented:
It sounds like it is having an issue with the NTFS ACLs.

Use /copy:DATO instead of /copyall.
robocopy \\server\share \\nas\share /E /copy:DATO /R:1 /W:3 /V /log:c:\output.txt
0
[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

 
wmeerzaCommented:
have you checked the inheritance on the destination folder?
0
 
Info985Author Commented:
At the folder level for both source and destination are set to inherit from parent.
0
 
Info985Author Commented:
Does ROBOCOPY make the user that is running command the owner of the folder? Or with switch COPY:OS it is supposed to take the ownership information from the source and apply it to destination.
Can the user with Full Control run the command and give ownership to original owner?
0
 
tenaj-207Commented:
>> Does ROBOCOPY make the user that is running command the owner of the folder? <<
By default yes

>> Or with switch COPY:OS it is supposed to take the ownership information from the source and apply it to destination.<<
The O option copies the owner information the S copies the security (ACL) information

>>Can the user with Full Control run the command and give ownership to original owner?<<
If ran with /copy:o then the folder/file should maintain the original ownership information.
0
 
Info985Author Commented:
What can be the reason that it is not copying the ownership information and making me the owner. It gave me the error : 1307 "Copying NTFS Security to Destination Directory. This security ID may not be assigned as the owner of this object"  when I used COPY with option O.
0
 
tenaj-207Commented:
The problem could be with the server or the or NetApp appliance. Try running the robocopy copy and for testing purposes copy the files to the server instead of the NetApp appliance.  You may wish to move only a small portion of the original files since this is just for testing purposes.

-tenaj
0
 
Info985Author Commented:
Sorry I tried copying it to my desktop giving Full control at the source and destination to the original user accout but no luck. It still carried my name as the owner.
0
 
tenaj-207Commented:
Can you confirm that the source location still has the right ownership properties to it?
0
 
Info985Author Commented:
Yes it does have right ownership...
0
 
tenaj-207Commented:
OK... so robocopy isn't working.  What if we get to the goal via another method.  After you copy the files use the administrator permissions to change the ownership rights.

If you don't want to do that we can continue to troubleshoot the problem.  First we'll need to find out where the problem is.  We know it's not the destination since the same problems occurs when you copy it to your desktop.  So the next test is to run the command using a different source.

Will you also post the robocopy command you're running (remove any identifying information).
0
 
wmeerzaCommented:
to isolate if this is a robocopy issue (or not) try using xcopy to test the theory. It too can copy file ownership/permissions with /o/k.   see xcopy /? for details.

This site will give you some good explanations.
http://www.enterprisenetworkingplanet.com/netos/article.php/3719606
0
 
Info985Author Commented:
xcopy does not maintain the timestamp as well as ownership information.
0
 
wmeerzaCommented:
"xcopy source destination /o/k" does retain ownership. The created date changes but the last modified date stays the same.
0
 
tenaj-207Commented:
Info985, please confirm in your last post that xcopy doesn't keep the timestamp and that xcopy doesn't keep the ownership information, I'm not sure if I'm reading it correctly.  

Is the NetApp filer part of the domain?  If not then you may not be able to transfer the ownership setting.  To test this out try to manually change the ownership information on a file on the NetApp filer.
0
 
wmeerzaCommented:
good suggestion tenaj, it is sounding like the netapp is out of the domain as both robocopy and xcopy should do the job fine.
Also try the same robocopy/xcopy commands to another network share to see if they work. If they do then all roads point to the netapp as the issue.
0
 
Info985Author Commented:
To avaoid NetApp issue I tried copying the folder to my desktop.

 Robocopy gave me " ERROR 1307 (0x0000051B) Copying NTFS Security to Destination  Directory \\ShareName\Foldername\This security ID may not be assigned as the owner of this object."

and Xcopy gave me "File creation error - This security ID may not be assigned as the owner of this object."

Here are the commands:

C:\>ROBOCOPY \\SourceShare\FolderName "C:\Documents and Settings\FolderName" /E DCOPY:T /COPY:O

C:\>XCOPY \\SourceShare\FolderName "C:\Documents and Settings\FolderName" /E  /O


0
 
Info985Author Commented:
To add: at both the locations destination and source the original folder owner has full control.
0
 
wmeerzaCommented:
do you have admin rights? I tested your exact command without admin and it failed with the same error
0
 
Info985Author Commented:
Great!! How should I thank you.. You are absolutely right.. After gaining the admin previleges of the machine the error went away and I could copy the folders with ownership information. Thanks to wmeerza and tenaj-207...
0
 
tenaj-207Commented:
Glad to hear it's working.  Good call on the permissions wmeerza.
0
 
wmeerzaCommented:
No problem, glad you got it sorted.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 10
  • 8
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now