How to copy share folds/files from one server to other without affecting share permission using robocoy command?

Question

robocopy (Robust File Copy), is a file replication command for Microsoft Windows. Robocopy functionally replaces Xcopy, with more options. Created by Kevin Allen and first released as part of the Windows NT 4.0 Resource Kit, it has been a standard feature of Windows since Windows Vista and Windows Server 2008.

in progress 0
admin 4 months 2022-03-11T17:57:57+00:00 1 Answer 84 views 0

Answer ( 1 )

    0
    2022-03-11T18:17:22+00:00
    This answer is edited.

    The example below show you how you can copy/migrate files/share folders included access permission from SERVERA to SERVERB.

    1. STEP 1: Make sure that you migrated all users and security groups from old server (SERVERA) to  the new server (SERVERB) first

    2. STEP 2: Use robocopy cmd below with appropriate parameters to full successfully migrate files/share folders:

    robocopy \\SERVERA\D$\Data\”  “\\SERVERB\D$\Data”   /MIR /SEC /SECFIX /R:1 /LOG:C:\Data\Log.txt

    Switches descriptions:

    • /MIR mirror a directory tree
    • /SEC files are copied with security (same as /copy:DATS)
    • /SECFIX fix security on all files
    • /R:1 number of retries on failed copies
    • /LOG: (/LOG:C:\Data\Log.txt) output status to LOG file

     

     

Leave an answer