Partilhar via


Enable Optimized Moving of Redirected Folders

 

Applies To: Windows 10, Windows 8, Windows 8.1, Windows Server 2012, Windows Server 2012 R2

This topic describes how to perform an optimized move of redirected folders (Folder Redirection) to a new file share. If you enable this policy setting, when an administrator moves the file share hosting redirected folders and updates the target path of the redirected folders in Group Policy, the cached content is simply renamed in the local Offline Files cache without any delays or potential data loss for the user.

Previously, administrators could change the target path of the redirected folders in Group Policy and let the client computers copy the files at the affected user's next sign in, causing a delayed sign in. Alternatively, administrators could move the file share and update the target path of the redirected folders in Group Policy. However, any changes made locally on the client computers between the start of the move and the first sync after the move would be lost.

In this topic

Prerequisites

Optimized move has the following requirements:

Step 1: Enable optimized move in Group Policy

To optimize the relocation of Folder Redirection data, use Group Policy to enable the Enable optimized move of contents in Offline Files cache on Folder Redirection server path change policy setting for the appropriate Group Policy Object (GPO). Configuring this policy setting to Disabled or Not Configured causes the client to copy all the Folder Redirection content to the new location and then delete the content from the old location if the server path changes.

To enable optimized moving of redirected folders

  1. In Group Policy Management, right-click the GPO you created for Folder Redirection settings (for example, Folder Redirection and Roaming User Profiles Settings), and then click Edit.

  2. Under User Configuration, navigate to Policies, then Administrative Templates, then System, then Folder Redirection.

  3. Right-click Enable optimized move of contents in Offline Files cache on Folder Redirection server path change, and then click Edit.

  4. Click Enabled, and then click OK.

Step 2: Relocate the file share for redirected folders

When moving the file share that contains users' redirected folders, it is import to take precautions to ensure that the folders are relocated properly.

Important

If the users’ files are in use or if the full file state is not preserved in the move, users might experience poor performance as the files are copied over the network, synchronization conflicts generated by Offline Files, or even data loss.

  1. Notify users in advance that the server hosting their redirected folders will change and recommend that they perform the following actions:

    • Synchronize the contents of their Offline Files cache and resolve any conflicts.

    • Open an elevated command prompt, type GpUpdate /Target:User /Force, and then sign out and sign back in to ensure that the latest Group Policy settings are applied to the client computer

      Note

      By default, client computers update Group Policy every 90 minutes, so if you allow sufficient time for client computers to receive updated policy, you do not need to ask users to use GpUpdate.

  2. Remove the file share from the server to ensure that no files in the file share are in use. To do so in Server Manager, on the Shares page of File and Storage Services, right-click the appropriate file share and then click Remove.

    Users will work offline using Offline Files until the move is complete and they receive the updated Folder Redirection settings via Group Policy.

  3. Using an account with backup privileges, move the contents of the file share to the new location using a method that preserves file timestamps, such as a backup and restore utility. To use the Robocopy command, open an elevated command prompt, and then type the following command, where <Source> is the current location of the file share, and <Destination> is the new location:

    Robocopy /B <Source> <Destination> /Copyall /MIR /EFSRAW
    

    Note

    The Xcopy command does not preserve all of the file state.

  4. Edit the Folder Redirection policy settings, updating the target folder location for each redirected folder that you want to relocate. For more information, see Step 4 of Deploy Folder Redirection with Offline Files.

  5. Notify users that the server hosting their redirected folders has changed, and that they should use the GpUpdate /Target:User /Force command, and then sign out and sign back in to get the updated configuration and resume proper file synchronization.

    Users should sign on to all machines at least once to ensure that the data gets properly relocated in each Offline Files cache.

See Also

Deploy Folder Redirection with Offline Files
Deploy Roaming User Profiles
Folder Redirection, Offline Files, and Roaming User Profiles overview