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

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

roby copy error from within server2003

Hi all. I have a large amount of data to move between 2 server 2003 servers. I am using robocopy with the following command to do some testing on individual folders before running it against the parent folder.
The command I run is
C:\>robocopy g:\SharedArea\user1 *.* "z:\user1" /copyall /mir /r:0 /tee
/log:"c:\temp\copy\copy.log

 Most of the data is copied but now and again I get an error:
ERROR 5 (0x00000005) Copying NTFS Security to Destination Directory g:\SharedArea\User1\profiles\Start Menu\Programs\Startup\
Access is denied.
Other folders also error area for example "accessibility", "system tools" within the profiles folder. I have checked and do not have permissions to the "profiles" folder but how can I copy it without the permission?.
I have logged onto the server as domain administrator so I can't understand the access denied error. Any help appreciated.
0
Jason Thomas
Asked:
Jason Thomas
  • 2
  • 2
  • 2
  • +3
4 Solutions
 
dardanceIT ConsultantCommented:
Try running robocopy in backup mode (with /B).
0
 
Sajid Shaik MSr. System AdminCommented:
check this link

http://sajidshaik.wordpress.com//?s=robocopy&search=Go

u can try Robocopy GUI aswell

all the best
0
 
Jason ThomasAuthor Commented:
If I use the /b option will that not strip out the current permissions? I need to both copy the data and retain permissions because the new area is to become the new file share server.
0
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

 
dardanceIT ConsultantCommented:
As far as i know it only runs the copy with backup permissions in order to bypass user permissions (works just as a backup software that is able to backup files in the user folders). But test it at another folder first just to be sure :)

I can see that some people experience some problems with junctions when they run robocopy in backup mode, so i would recommend using /XJD and /XJF as well. (Source: http://serverfault.com/questions/83280/server-2008-robocopy-access-denied-to-user-folders-b-error-i-dont-understand)

Let me know how it works out.
0
 
Shahnawaz AhmedCommented:
You must have permission on root level on both directories and inherit to the child one. So when you copy nothing is going to be left out.

I am giving you some useful links to understand the robo copy switches easily.

Please go through once

http://ss64.com/nt/robocopy.html
http://www.computerhope.com/robocopy.htm
0
 
Mr TorturSystem EngineerCommented:
Hi JasonHels,
your approach is fine, just use the /ZB switch in your command and it will be fine.
/B switch could resolve your issue too, but will slow down the entire copy.

The /COPYALL flag will copy all ntfs existing permissions to the target folder, as these are 2 separate things (permissions on files and backup mode).
0
 
Spike99On-Site IT TechnicianCommented:
I'm not sure that robocopy will ever copy files & folders that you can't access normally.

By default, admins do NOT have rights to user profile folders.  There is a GPO that you can use to grant the administrators group full access to user profile folders, but that will only work on any new profiles.
See MS Technet article on policy settings related to user profiles. The one to add admin rights is called, "Add the Administrators security group to the roaming user profile share":
http://technet.microsoft.com/en-us/library/cc781862(v=ws.10).aspx

So, you will need to fix permissions of the existing profile folders so you can copy their complete contents.

Although, I've never tried this myself, you could set up a logon script for users that would add the admin group full rights to their profile folder.  I believe the syntax of that command would be:
icacls \\servername\profiles$\%username% /grant administrators:(F) /T

Open in new window


Or, you could run a script that will recursively reset permissions on all the profile folders in a share so that the admin group has full access.  The posts on this blog page should be of some help in writing the script to fit your environment:
http://www.mcbsys.com/techblog/2010/10/reset-roaming-profile-and-folder-redirection-permissions/

I hope this helps.
0
 
Mr TorturSystem EngineerCommented:
Hi Spike99,
backup mode is a special right ; being logged as domain admin and with this /b flag, it must work.
This right is used by a lot (if not all) windows backup softwares.
If not, how would you do to usually backup user profiles/data ? you always add rights for the admins ?
From a user side it is not always acceptable that domain admin or IT guys have full rights on their stuff.
0
 
Spike99On-Site IT TechnicianCommented:
Mr Tortur,
I've never used the /b switch with robocopy: I always just fixed permissions on anything it couldn't copy.
In our environment at my last job, we used to manually create the user profile folders when creating the user accounts, so this wasn't an issue for us when we had to move user profiles to a new server.  Then, it was decided it took too long when creating user accounts, so we enabled the policy setting to give the admins group rights to the user profile folders.
0
 
Jason ThomasAuthor Commented:
Some great answers and links. I now have a much better understanding of the process so thank you to all. Hope all is happy with points split.
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.

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