Copy files and NTFS permissions between servers

GD Star Rating
loading...

How to copy files and NTFS permissions between servers. This is a really helpful tip and critical with NTFS permissions using robocopy. I needed to copy 5 gigs of data from one server to another and the permissions were very difficult to replicate. Here is a good way to do it using robocopy.

1. Grab a copy of the Windows 2003 resource kit and install
2. Copy robocopy.exe from the C:Program FilesWindows Resource KitsTools and paste it into the c: root of the server that you want to copy files to
3. Open up a command prompt, cd to get yourself to the root of C: drive and then type in robocopy /E /SEC /COPYALL
4. Wait for files and permissions to transfer…and you are done!

I was able to do this with many files and 5 gigs of data across servers on the same lan in about 12 minutes. This seems to be fast but the copying of permissions with the files makes this a perfect solution to that age old problem of moving data and permissions when moving application data or even desktop data for users.

Here is one example of how useful some of those free apps in the Windows 2003 resource kit are when admining Windows apps and servers. Robocopy has a lot of options and there is more information than this in the robocopy document that comes in the Windows 2003 resource kit.

GD Star Rating
loading...
Tags: copy files with ntfs rights, robocopy ntfs permissions, copy ntfs permissions, copy files with permissions, robocopy ntfs, robocopy copy permissions, robocopy copy ntfs permissions, copy files with ntfs permissions, robocopy with ntfs permissions, copy ntfs permissions from one server to another, robocopy between servers

Comments

  1. bob says:

    can you specify a source or destination directory, your step # 3 doesnt show any?

    GD Star Rating
    loading...
  2. Ahmad says:

    I got a better idea:

    http://www.ghisler.com – total commander – worth every penny.

    GD Star Rating
    loading...
  3. Phil says:

    I like this tool, it automatically fixes ACLs if you migrate permissions that contain local groups or local users of a member server or migrate accounts cross domain. It can even migrate the user’s passwords.

    http://www.sys-manage.com/PRODUCTS/CopyRight/tabid/64/Default.aspx

    Phil

    GD Star Rating
    loading...
  4. Frank says:

    Total Commander is to slow if you are doing +100 GB transfees in my opnion.

    To bad Robocopy does not retain permissions if you are copying across domains, even in the same forests. At least I haven“t found out a way to do that yet.

    regards
    Frank

    GD Star Rating
    loading...
  5. Wayne says:

    Robocopy will do security, but you have to include the /E flag.

    robocopy source destination /S /ZB /COPYALL /PURGE /R:5 /W:5 /V /IF *.jpg
    Will copy just jpgs and won’t set the security

    but with the /E flag added:

    robocopy source destination /S /E /ZB /COPYALL /PURGE /R:5 /W:5 /V /IF *.jpg
    will copy the files and include empty folders – however now you get empty subdirectories if like me you’ve filtering down to one file type

    Robocopy V5.1.10.1027

    GD Star Rating
    loading...
  6. Wayne says:

    However you can delete the empty folders afterwards by using the RD command.

    c:
    cd\
    cd temp
    cd “empty test”
    for /f “delims=” %%i in (‘dir /s /b /ad ^| sort /r’) do rd “%%i”
    cd ..

    RD attempts to remove ever directory in the folder

    c:\temp\empty test

    but RD fails if the folder isn’t empty, so it wil only ever delete empty directories, not the directories with one or more file in.

    TEST before putting this into practice!!!

    http://blogs.msdn.com/b/oldnewthing/archive/2008/04/17/8399914.aspx

    GD Star Rating
    loading...

Speak Your Mind

Web Statistics