Export (0) Print
Expand All

Copy SYSVOL to a New Location

Updated: April 25, 2011

Applies To: Windows Server 2008, Windows Server 2008 R2

If you want to relocate the SYSVOL directory, you can use this procedure to create the new directory location and copy the SYSVOL folders to the new location. By default, the root of the SYSVOL directory is located at %systemroot%\SYSVOL. To move SYSVOL properly, you must correctly copy the contents of the SYSVOL folder. A subfolder with the default location of %systemroot%\SYSVOL is also named sysvol. Ensure that you copy the root folder (%systemroot%\SYSVOL) and not the subfolder (%systemroot%\SYSVOL\sysvol).

ImportantImportant
To retain the SYSVOL security settings, you must use the proper robocopy command, as described in this procedure. To prevent conflicts, use the updated version of Robocopy available in Microsoft Knowledge Base article 979808. If you perform a simple copy and paste in Windows Explorer, security settings are not copied. In this case, you must reapply security settings. For information about reapplying security settings, see Reapply Default SYSVOL Security Settings. For information about using robocopy, see Robocopy (http://go.microsoft.com/fwlink/?LinkId=122544).

Before you perform this procedure, you must have performed the following procedures:

Membership in Domain Admins, or equivalent, is the minimum required to complete this procedure. Review details about using the appropriate accounts and group memberships at Local and Domain Default Groups (http://go.microsoft.com/fwlink/?LinkId=83477).

  1. Open a Command Prompt as an administrator: On the Start menu, right-click Command Prompt, and then click Run as administrator. If the User Account Control dialog box appears, provide Domain Admins credentials, if required, and then click Continue.

  2. At the command prompt, type the following command, and then press ENTER:

    robocopy <Source Folder> <Destination Folder> /copyall /mir /b /r:0 /xd "DfsrPrivate" "<domain>" /xf "DfsrPrivate"

    Where <domain> is the fully qualified domain name, such as contoso.com. This Robocopy command will create the destination folder. It will also exclude junction points so you can re-create them later using mklink.exe without encountering an error. If you do not exclude the junction points, mklink.exe can return an error “Cannot create a file when that file already exists.”.

     

    Parameter Description

    <Source Folder>

    The path to the SYSVOL directory that you are copying. The default location is %systemroot%\SYSVOL.

    <Destination Folder>

    The path to the new SYSVOL location that you created in step 1.

    /copyall

    Copies the following file information: data, attributes, time stamps, NTFS access control list (ACL), owner information, and auditing information.

    /mir

    Mirrors the directory tree that you are copying.

    /b

    Copies files in backup mode. Robocopy uses backup mode to override file and folder permission settings (ACLs).

    /r:0

    Specifies performing 0 (zero) retries on failed copies.

    /xd "DfsrPrivate" “<domain>”

    Excludes the DfsrPrivate and domain directory from the copy.

    /xf "DfsrPrivate"

    Excludes the DfsrPrivate file from the copy.

  3. Verify that the folder structure was copied correctly. To compare the new folder structure to the original, open a Command Prompt as an administrator: On the Start menu, right-click Command Prompt, and then click Run as administrator. If the User Account Control dialog box appears, provide Domain Admins credentials, if required, and then click Continue.

  4. Verify that the folder structure was copied correctly. To compare the new folder structure to the original, change directories to the new SYSVOL folder. To list the contents of the folder and subfolders by size, type the following command, and then press ENTER:

    dir /s
    

    Compare the ouptut with the output for the original SYSVOL folder. Ensure that all folders exist and that file sizes are the same. If any folders are missing at the new location (such as \scripts), re-create them.

  5. Verify that the security settings on the moved SYSVOL are the same as the settings on the original location.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft