Announcement

Collapse
No announcement yet.

Why won't this robocopy work?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why won't this robocopy work?

    I am trying to migrate data from an existing file server to a new file server, but I want to preserve NTFS security permissions on the folders and files. The source server is Win 2000 Server, the destination is Win 2008 Server (if that's of any relevence).

    I'm using the following robocopy cmd, it copies the files but not the security permissions:
    robocopy s:\Docs d:\Docs /copyall /E /Z /R:5 /W:20 /eta

    I can get it to work using xcopy with this command:
    xcopy s:\Docs d:\Docs /e /v /c /h /r /k /o /x /y
    But I really would rather use robocopy if I can.

    I've tried replacing the /copyall switch with /copy:datsou but the result is the same. I've also tried removing the /z switch (as it used to not work with xcopy & security /o /x) but that made no difference either.

    Please help, I need to get this sorted asap.
    I've been using this online backup for all my photos, docs, spreadsheets, powerpoints & emails for years now & it works great.
    Go Here for their free 5GB: http://www.idrive.com/p=gavamm
    I upgraded to the Personal Plan for peace of mind for not much more than a cup of coffee.

  • #2
    Re: Why won't this robocopy work?

    Are both servers in the same AD domain?

    Comment


    • #3
      Re: Why won't this robocopy work?

      Yes, single domain.
      I've been using this online backup for all my photos, docs, spreadsheets, powerpoints & emails for years now & it works great.
      Go Here for their free 5GB: http://www.idrive.com/p=gavamm
      I upgraded to the Personal Plan for peace of mind for not much more than a cup of coffee.

      Comment


      • #4
        Re: Why won't this robocopy work?

        In Windows XP I believe it's the /SEC switch will copy the security permissions.

        Hope this helps
        Last edited by twoip; 14th April 2010, 10:35.

        Comment


        • #5
          Re: Why won't this robocopy work?

          Originally posted by woodgrain View Post
          it copies the files but not the security permissions
          I am become User Account Control, destroyer of adminisitrator's privileges.

          Run a shell with run as admin feature and use robocopy's /sec switch. An ordinary domain admin account running shell can read & copy files just fine, but setting the ACLs is not working for UAC wrecks havoc.

          I got bitten by this last week, man were I annoyed to no end.

          -vP

          Comment


          • #6
            Re: Why won't this robocopy work?

            Hmm, well I tried something a bit different and it returned some interesting results.

            As I didn't want to restore the whole Docs folder each time I was testing it I was using RoboCopy on the S:\Docs\Scanner as the folder to try copying, as the Scanner folder has an additional non-inherited user with assigned permissions. ie:
            robocopy s:\Docs\Scanner d:\Docs\Scanner /copyall /E /Z /R:5 /W:20 /eta

            I created an additional sub-folder in the S:\Docs\Scanner folder called "Test" and assigned permissions to it. Permissions were retained on the sub-folder!

            So it looks like RoboCopy may not transfer the permissions for the top level folder you are copying, but it does for all other sub-folder permissions.

            So best practice will be to:
            1. Create the top-level folder manually on the destination & assign sharing & security permissions. This will mean that you won't have to apply permissions to ALL child objects after the copy as they will pick them up during the copy.
            2. RoboCopy the files based on top level folder (doesn't over-write permissions)

            ________________________
            @twoip, /SEC is included in the /copyall command
            @vonPryz, an excelent thought, but I was running it from the server & logged in as the Domain Admin anyway
            Last edited by woodgrain; 16th April 2010, 04:16. Reason: added "destination" wording to step 1
            I've been using this online backup for all my photos, docs, spreadsheets, powerpoints & emails for years now & it works great.
            Go Here for their free 5GB: http://www.idrive.com/p=gavamm
            I upgraded to the Personal Plan for peace of mind for not much more than a cup of coffee.

            Comment


            • #7
              Re: Why won't this robocopy work?

              Originally posted by woodgrain View Post
              I was running it from the server & logged in as the Domain Admin anyway
              I used an account with Schema & Enterprise & Domain Admin privileges (forest upgrade in progress), and still got bitten by the UAC limatations. I got Access Denied error from Robocopy. UAC limitations are different than ordinary access limts.

              -vP

              Comment


              • #8
                Re: Why won't this robocopy work?

                Originally posted by woodgrain View Post
                So it looks like RoboCopy may not transfer the permissions for the top level folder you are copying, but it does for all other sub-folder permissions.
                I believe it does transfer the permissions but if the permissions are inherited from a folder higher up then they won't be copied because they are not in the ACL of the particular file or folder.
                Regards,
                Jeremy

                Network Consultant/Engineer
                Baltimore - Washington area and beyond
                www.gma-cpa.com

                Comment

                Working...
                X