BranchCache Migration: Migrating BranchCache

Applies To: Windows Server 2008 R2

Complete the following procedures to migrate the dedicated BranchCache server.

Migrate BranchCache to the destination server

Membership in Administrators or equivalent is the minimum required to complete these procedures. Review details about how to use the appropriate accounts and group memberships at Run a program with administrative credentials (https://go.microsoft.com/fwlink/?LinkId=131210)

To migrate BranchCache to the destination server

  1. To disable the BranchCache service, run the following command in a Windows PowerShell session on the source server:

    Set-Service PeerDistSvc -StartupType Disabled
    
  2. If the BranchCache service is running, stop the service by running the following Windows PowerShell cmdlet:

    Stop-Service PeerDistSvc
    
  3. To verify that the Current Status of the service is stopped and its Start Type is Disabled, run the following command:

    netsh branchcache show status all
    

You are now ready to migrate the BranchCache feature from the source server to the destination server.

Migrate BranchCache from the source server

Follow the next steps to migrate BranchCache data and settings.

To migrate BranchCache from the source server

  1. On the source server, open a Windows PowerShell session with elevated user rights. To do this, click Start, click All Programs, click Accessories, click Windows PowerShell, right-click the Windows PowerShell shortcut, and then click Run as administrator.

  2. Load Windows Server Migration Tools into your Windows PowerShell session.

    If you opened the current Windows PowerShell session by using the Windows Server Migration Tools shortcut on the Start menu, skip this step and go to the next step. Only load the Windows Server Migration Tools snap-in in a Windows PowerShell session that was opened by using some other method, and into which the snap-in has not already been loaded.

    To load Windows Server Migration Tools, run the following cmdlet:

    Add-PSSnapin Microsoft.Windows.ServerManager.Migration
    
  3. On the source server, in a Windows PowerShell session, if the BranchCache feature is installed, run the following command to determine the start type of the BranchCache service:

    netsh branchcache show status all
    

    The start type that is returned most frequently is Automatic Start. Record the service start type for future reference. Service start types may be any of the following: Disabled, Demand Start, or Auto Start.

  4. To disable the BranchCache service, run the following command:

    Set-Service PeerDistSvc -StartupType Disabled
    
  5. To stop the BranchCache service, in the Windows PowerShell session, run the following command:

    Stop-Service PeerDistSvc
    
  6. To verify that the Current Status of the service is stopped and its Start Type is Disabled, run the following command:

    netsh branchcache show status all
    
  7. On the source server, run the Export-SmigServerSetting cmdlet, where storepath is the path that contains Svrmig.mig after this step is completed. An example of the path is \\fileserver\users\username\branchcachestore.

    Export-SmigServerSetting -featureID BranchCache -path <storepath> -IPConfig -Verbose
    

Import BranchCache settings to the destination server

Perform the steps in this section to import the migration store that was exported from the source server.

To import BranchCache settings to the destination server

  1. Open a Windows PowerShell session with elevated user rights. To do this, click Start, click All Programs, click Accessories, click Windows PowerShell, right-click the Windows PowerShell shortcut, and then click Run as administrator.

  2. Load Windows Server Migration Tools into your Windows PowerShell session.

    If you opened the current Windows PowerShell session by using the Windows Server Migration Tools shortcut on the Start menu, skip this step and go to the next step. Only load the Windows Server Migration Tools snap-in in a Windows PowerShell session that was opened by using some other method, and into which the snap-in has not already been loaded.

    To load Windows Server Migration Tools, run the following command:

    Add-PSSnapin Microsoft.Windows.ServerManager.Migration
    
  3. On the destination server, run the following command where storepath is the path that contains the Svrmig.mig file:

    Import-SmigServerSetting -featureid BranchCache -Path <storepath> -Force -Verbose
    

Migrate BranchCache cache files

Because BranchCache cache files can be very large, they are migrated separately from other BranchCache data.

To migrate BranchCache cache files

  1. Open a Windows PowerShell session on both the source and destination servers. If your source server is running Windows Server 2008 or Windows Server 2008 R2, you must open Windows PowerShell with elevated user rights.

  2. Verify that the destination path has sufficient disk space to migrate the data. If NTFS or FSRM quota management is enabled on the destination server disk drive, verify that the NTFS or FSRM quota limit allows for sufficient free disk space to migrate data. For more information about FSRM quota management, see one of the following.

    For more information about NTFS quota management, see one of the following.

  3. In the Windows PowerShell sessions on both servers, run the following command to determine the paths to your cache files. The paths to the cache files are required to complete this procedure.

    netsh branchcache show localcache
    
  4. In the Windows PowerShell session on the destination server, run the Receive-SmigServerData cmdlet:

    Receive-SmigServerData
    
  5. In the Windows PowerShell session on the source server, run the following command, in which source_path represents the path to the cache files on the source server, and destination_path represents the path to the cache files on the destination server:

    Send-SmigServerData -ComputerName <DestinationServer> -SourcePath <source_path> -DestinationPath <destination_path> -Include All -Force
    

Complete the migration on the destination server

Start the BranchCache service (PeerDistSvc) on the destination server to complete migration.

To start the BranchCache service on the destination server

  1. Set the startup type of the destination BranchCache service to the startup type you recorded in step 3 of To migrate BranchCache from the source server, by running the following command in a Windows PowerShell session:

    Set-Service PeerDistSvc -startupType <startup type from source>
    
  2. To start the BranchCache service, in a Windows PowerShell session, run the following command:

    Start-Service PeerDistSvc
    

Migrate server identity

The source server must be renamed and its previous computer name and IP address must be migrated to the destination server. If the server computer name and IP address are not migrated, you will need to point branch clients to the destination server as described in the “Restart and reconfigure the service” section of the BranchCache Migration: Post-migration Tasks topic.

Rename source server

Rename the source server to a temporary name.

Migrate IP address

When the server name is migrated, the static IP address of the server must also be migrated. This is because client computers cache the IP address associated with a server name locally. Client computers still attempt to access the source server even if it has been renamed.

Important

For IP address migration instructions, see the “IP Configuration: Migration” topic in the IP Configuration Migration Guide (https://go.microsoft.com/fwlink/?LinkId=128513).

Rename destination server

Rename the Destination server to the original name that was used for the source server.

Conclusion

When this migration is complete, client computers on the network that were served by the source server will now be served by the new x64-based destination server that is running Windows Server 2008 R2. The migration is complete when the destination server can meet the content requests of Windows® 7 clients.

See Also

Concepts

BranchCache Migration Guide
BranchCache Migration: Preparing to Migrate
BranchCache Migration: Verifying the Migration
BranchCache Migration: Post-migration Tasks