Move Team Foundation Server from One Hardware Configuration to Another

You can move an instance of Visual Studio Team Foundation Server from one hardware configuration to another by performing a restoration-based move. This type of move is not only the most common but also one of the most complex types of move for Team Foundation Server. Before you start a restoration-based move, you should ensure that this type of move best suits your organizational objectives. For more information, see Team Foundation Server Move Types.

Important

As you plan a deployment move, you should verify the scope and purpose of the changes that you expect to make and compare them to the scenarios for each type of move. By choosing the correct move type, you not only minimize confusion and disruption of team productivity but also help ensure the long-term efficiency of your deployment.

Restoration-based moves require that you restore the databases for your deployment to the new server or servers that will host them. This is required in order to move the data-tier. After you have moved all of the databases, you can move the application tier by reinstalling it on another server. You must then reconfigure the deployment to add the accounts, locations, and services required for operation.

The procedures in this topic are written to support moving all aspects of a deployment of Team Foundation Server to new hardware: the databases, the application tier, and any other components you have configured to support the deployment (reporting, SharePoint Products). You can choose to skip steps that do not apply to your specific deployment. For example, if you did not configure reporting, you can skip steps for moving and reconfiguring reporting. If you only want to move the databases for Team Foundation Server, see Restore Data to a Different Server or Instance. If you only want to move the application tier, see Restore an Application-Tier Server. If you want to move from a single-server deployment to a multiple-server deployment, see Move from a Single-Server to a Dual-Server Deployment. If you want to move a single team project collection, see Move a Team Project Collection.

To perform a restoration-based move, you must complete the procedures in the following sections:

  • Stop Services that Team Foundation Server Uses

  • Back up the Databases and the Encryption Key

  • Install and Configure SQL Server on the New Data-Tier Server

  • Install and Configure Required Software on the New Application-Tier Server

  • Restore the Databases

  • Redirect SharePoint Products to the New Location of the Content Database

  • Install the Application Tier on the New Hardware

  • Prepare SQL Server for Team Foundation Server

  • Redirect Team Foundation Server to its Databases

  • Change the Ownership of the Moved Databases

  • Update All Service Accounts

  • Configure the Application Tier on the New Hardware

  • Update the URL for the Application-Tier Server

  • Configure SharePoint Products

  • Configure Reporting and SQL Server Analysis Services

  • Verify Permissions for Users, Groups, and Service Accounts

  • Configure Project Server Integration

  • Refresh the Data Cache on Client Computers

Required Permissions

To perform the procedures in this topic, you must be a member of the following groups or have the following permissions:

  • A member of the Administrators security group on the server or servers that are running the administration console for Team Foundation.

  • Either a member of the SQL Server System Administrator security group or have your SQL Server Perform Back Up and Create Maintenance Plan permissions set to Allow on the instance of SQL Server that will host the databases. 

  • A member of the sysadmin security group for the databases for Team Foundation and for the SQL Server Analysis Services database.

  • An authorized user of the TFS_Warehouse database.

  • If the deployment uses SharePoint Products, a member of the Farm Administrators group for the farm to which you are restoring the databases for SharePoint Products.

In addition to these permissions, you might have to address the following requirements on a computer that is running Windows Server 2008, Windows Server 2008 R2, Windows Vista, or Windows 7:

  • To follow a command-line procedure, you might need to open an elevated Command Prompt by clicking Start, right-clicking Command Prompt, and clicking Run as Administrator.

  • To follow a procedure that requires Internet Explorer, you might need to start it as an administrator by clicking Start, clicking All Programs, right-clicking Internet Explorer, and then clicking Run as administrator.

  • To access Report Manager, reports, or Web sites for Reporting Services, you might need to add these sites to the list of trusted sites in Internet Explorer or start Internet Explorer as an administrator.

For more information, see the following topic on the Microsoft Web site: User Account Control.

Stop Services that Team Foundation Server Uses

Before you can restore data, you must stop all services that Team Foundation Server uses on every server. If you have optional components installed, such as SharePoint Products or SQL Server Reporting Services, you must stop those services on the servers where these components are installed.

To stop services that Team Foundation Server uses

  1. On the server that is running the application-tier services for Team Foundation, open a Command Prompt window, and change directories to Drive:\%programfiles%\ Microsoft Team Foundation Server 2010\Tools.

  2. Type the following command:

    TFSServiceControl quiesce

    For more information, see TFSServiceControl Command.

Back up the Databases and the Encryption Key

Before you can move your deployment of Team Foundation Server, you must back up its databases. As part of the move, you will restore these databases to the new data-tier server.

To prepare the old deployment for a restoration-based move

  1. Back up all the databases for Team Foundation Server.

    For more information, see Back Up Team Foundation Server.

    Note

    You must also back up any custom site definitions, custom site templates, or custom Web parts for SharePoint Products that you want to keep. For more information, see "Backup and Restore Options for Windows SharePoint Services 2.0" on the Microsoft Web site or, for Windows SharePoint Services 3.0, "Choose backup and recovery tools (Windows SharePoint Services)" on the Microsoft Web site.

  2. Back up the encryption key for Reporting Services, and store it in a secure location on a different computer from the server that is running Team Foundation Server. Make sure that the new deployment can access the key, and store the password with which the key is encrypted.

    For more information, see Back Up the Reporting Services Encryption Key.

Install and Configure SQL Server on the New Data-Tier Server

To restore data for Team Foundation, you must install SQL Server on the computer to which you want to move the databases for Team Foundation Server. The version of SQL Server that you install must exactly match the version on the original server that hosted the databases, including service pack level, collation settings, and language edition. If the match is not exact, you might not be able to restore the data or Team Foundation Server might not operate correctly even if you can restore the data.

If you want to use more than one server to host the databases for Team Foundation Server, you must install and configure SQL Server accordingly, either as a farm or as individual servers.

To install and prepare SQL Server for the restoration of data for Team Foundation

  • Install SQL Server in the new environment, and make sure that it is operational. As an alternative, create an instance of SQL Server on a server that already has a matching version installed.

    For more information, you can download the most recent version of the installation guide for Team Foundation from the following page on the Microsoft Web site: Installation Guide for Team Foundation. In that guide, you can find topics about how to install SQL Server in a multiple-server deployment. You must install the same version that you used in the original installation of Team Foundation Server.

Install and Configure Required Software on the New Application-Tier Server

To configure a new server or servers to act as the new application-tier, you must first install and configure the software that is required to support Team Foundation Server. This software includes the following components:

  • a supported operating system for your deployment configuration

  • Internet Information Services (IIS)

  • SQL Server Reporting Services (if your deployment uses reporting)

  • SharePoint Products (if your deployment is integrated with SharePoint Products)

Note

You will not be able to install SharePoint Products as part of the installation of the application tier when you move it to a new server. You must install the same version and edition of SharePoint Products that you used in your previous deployment.

To install and configure required software

  • Install and configure Windows, SQL Server Reporting Services, and SharePoint Products in the new environment, and make sure that the server and its software are operational. 

    For more information, you can download the most recent version of the installation guide for Team Foundation from the following page on the Microsoft Web site: Installation Guide for Team Foundation. In that guide, follow the instructions in the "Installing Prerequisites" section for the following components:

    • Internet Information Services (IIS)

    • SQL Server Reporting Services

    • SharePoint Products

      Note

      You can choose to change versions or editions of some software, such as SharePoint Products, but not others. Changing versions or editions might complicate the restoration. For optimal results, consider restoring to exactly the same software and then upgrading after the restoration is completed.

Restore the Databases

After you stop the services, you can restore data for Team Foundation onto the new data-tier server by using the restore tools that are provided with SQL Server.

Warning

You must restore all databases to the same point in time, or the databases will be out of synchronization. The following procedures assume that you are using marked transactions to help ensure synchronization. For more information, see Back Up Team Foundation Server.

To open the Restore Database dialog box

  1. Log on to the server to which you want to restore databases.

  2. Click Start, point to All Programs, point to Microsoft SQL Server 2008, and then click SQL Server Management Studio.

    Note

    For more information about how to restore databases, see the following page on the Microsoft Web site: Implementing Restore Scenarios for SQL Server Databases.

    The Connect to Server dialog box opens.

  3. In the Server type list, click Database Engine.

  4. In Server name, click or type the name of the data-tier server and database instance, and then click Connect.

    Note

    If SQL Server is installed on a cluster, the server name is the name of the cluster and not the computer name.

    SQL Server Management Studio opens.

  5. Expand the Databases node to show the list of databases that make up the data tier for Team Foundation.

Complete the next procedure "To restore a database" for the following databases on each server where you have installed and configured SQL Server:

On the server or servers that host the databases for Team Foundation Server:

  • TFS_Configuration

    Note

    This database name might include additional characters between TFS_ and Configuration.

  • TFS_CollectionName

    Note

    Each team project collection has its own database. For example, if you have five team project collections, you will have five databases, each distinguished by the name of the team project collection. These databases might be on the same instance of SQL Server, on separate instances, or on separate physical servers. You must back up each of these databases and then restore each one of them.

  • TFS_Warehouse

    Note

    This database name might include additional characters between TFS_ and Warehouse.

On the server that is running Reporting Services, if you have one configured for your deployment and must restore the databases to a different server:

  • ReportServer

    Note

    If you used a named instance, this database will be named ReportServer$InstanceName.

  • ReportServerTempDB

    Note

    If you used a named instance, this database will be named ReportServerTempDB$InstanceName.

On the server or servers that are running SharePoint Products, if you have configured your deployment with one or more SharePoint Web applications and must restore the databases to a different server:

  • The content database for SharePoint Products (WSS_Content)

    Note

    The names of the databases that contain data for SharePoint Products will vary based on the version of SharePoint Products that is installed and whether the person who installed it customized the name. Additionally, these databases might not reside on the data-tier server if SharePoint Products is installed on a separate server from Team Foundation Server. If the databases reside on different servers, you must back up, restore, and configure them separately from Team Foundation Server. However, you should synchronize the maintenance of the databases to avoid synchronization errors.

On the server that is running SQL Server Analysis Services, if you have one configured for your deployment and must restore the databases to a different server:

  • TFS_Analysis

For more information about these databases, see Understanding Backing Up Team Foundation Server.

To restore a database

  1. Right-click the database that you want to restore, point to Tasks, point to Restore, and then click Database.

    The Restore Database dialog box opens.

  2. Under Source for restore, click From Device, and then click the ellipsis button ().

  3. In the Specify Backup dialog box, specify the location of the backup file, and then click OK.

    The first backup that you restore must be a full backup, followed by the differential backup, and then the transaction log backups, in the order in which they were created.

  4. Under Select the backup sets to restore, specify the backup sets to restore.

    Make sure that you restore the full, differential, and transaction log databases if you created marked transaction backup sets. For more information about marked transactions, see Back Up Team Foundation Server.

  5. In the Select a page pane, click Options, and then select the Overwrite the existing database check box.

  6. In the Restore the database files as list, verify that the paths match your current database paths.

  7. Under Recovery state, perform one of the following steps:

    • If you are using marked transactions, click Leave the database non-operational, and do not roll back uncommitted transactions. Additional transaction logs can be restored. (RESTORE WITH RECOVERY).

    • If you are not using marked transactions and you are not applying additional transaction logs, click Leave the database ready to use.

    • If you are not using marked transactions but you are applying additional transaction logs, click Leave the database non-operational.

  8. Click OK.

    A progress icon appears.

  9. When the SQL Server Management Studio dialog box appears and confirms successful restoration, click OK to return to Object Explorer.

  10. If you are using marked transactions, right-click the database that you just restored, point to Tasks, point to Restore, and then click Transaction Log.

    The Restore Transaction Log window opens.

  11. On the General page, make sure that the appropriate database is selected in the Database list.

  12. Under Select the transaction log to restore, select the check box next to the log that you want to restore.

  13. Under Restore to, click Marked transaction.

    The Select Marked Transaction window opens.

  14. In the Select the marked transaction to stop the restore at list, select the check box next to the transaction mark that you want to use for the restoration, and then click OK.

    Important

    You must use the same transaction mark that has the same date and time for all databases to successfully restore the data.

  15. In the Restore Transaction Log window, click OK.

    A progress icon appears.

  16. When the SQL Server Management Studio dialog box appears and confirms successful restoration, click OK.

    For more information, see the following page on the Microsoft Web site: Applying Transaction Log Backups.

Note

If you restored the databases for Reporting Services, you must also restore their encryption key. For more information, see the following topic on the Microsoft Web site: Restoring the Encryption Key (Reporting Services Configuration).

Redirect SharePoint Products to the New Location of the Content Database

After you have moved the content database for SharePoint Products (WSS_Content) to the new server, you must redirect the server that is running SharePoint Products to the new location of that database. This database must be operational before you can reconfigure Team Foundation Server with the new locations of its databases.

To redirect project sites to use the content database on the new data-tier server

Install the Application-Tier Server

In order to gain access to the command-line tools for Team Foundation Server, you must install them by installing Team Foundation Server on the computer that will be the application-tier server. You must use several of these tools before you can configure the server as the application-tier server. Make sure that you cancel the configuration wizard that appears after the software installation is complete. You can complete the configuration wizard for the new application-tier server after the preparation steps are complete.

To install the application-tier server

  • Install Team Foundation Server on the new server, and start the application-tier only wizard.

    For more information and step-by-step procedures, download the most recent version of the installation guide for Team Foundation from the following page on the Microsoft Web site, and follow the instructions for using the application-tier only wizard: Installation Guide for Team Foundation.

Prepare SQL Server for Team Foundation Server

Before the moved databases will work correctly, you must use the TFSConfig PrepSQL command to prepare SQL Server to host databases for Team Foundation Server. This command creates the TFSEXECROLE and TFSADMINROLE groups on the new server or instance and also adds the system messages that are required for operation.

To prepare SQL Server to host databases for Team Foundation Server

  1. Log on to the server, open a Command Prompt window, and then change directories to Drive:\%programfiles%\ Microsoft Team Foundation Server 2010\Tools.

  2. Type the following command, where ServerName is the name of the instance of SQL Server that hosts the databases for Team Foundation Server, in either ServerName or ServerName\InstanceName format:

    **TFSConfig PrepSQL /SQLInstance:**ServerName

Redirect Team Foundation Server to its Databases

You must redirect Team Foundation Server to its moved databases. In addition, you must run the RemapDBs command if any of the following conditions is true:

  • The TFS_Analysis or the TFS_Warehouse database is hosted on a different server from TFS_Configuration.

  • You are using a named instance to host your databases.

  • You have one or more collection databases hosted on a different server from the configuration database.

To redirect Team Foundation Server to its databases

  1. Log on to the application-tier server for Team Foundation, open a Command Prompt window, and change directories to Drive:\% programfiles%\ MicrosoftTeam Foundation Server 2010\Tools.

  2. Type the following command, where ServerName is the name of the instance of SQL Server that hosts the configuration database for Team Foundation Server, TFS_Configuration is the name of the restored configuration database for Team Foundation Server, and ServerName2 is the name of the server that hosts the remote collection. You can have as many ServerName parameters as you have servers configured in your deployment. You can specify ServerName in either ServerName or ServerName\InstanceName format. You must specify the instance name if you are not using the default instance:

    **TFSConfig RemapDBs /DatabaseName:ServerName;**TFS_Configuration **/SQLInstances:**ServerName,ServerName2 **/AnalysisInstance:**ServerName2 **/AnalysisDatabaseName:**DatabaseName

    Note

    In /SQLInstances, you must specify all of the instances, separated by commas, of SQL Server that host databases for Team Foundation Server. For more information, see RemapDBs Command.

Change the Ownership of the Moved Databases

You must use the TFSConfig Accounts ResetOwner command to change the database owner login for the moved databases to the current user. Before you perform the next sequence of steps, make sure that the user account with which you are logged on is an appropriate account. For example, you can use the same account with which Team Foundation Server was installed, referred to in the installation guide as TFSSETUP. At a minimum, you must use an account that is a member of the Team Foundation Administrators group in Team Foundation Server and a member of the sysadmin group in SQL Server.

To change the ownership of the restored databases to the current user

  1. Open a Command Prompt window, and change directories to Drive:\%programfiles%\ Microsoft Team Foundation Server 2010\Tools.

  2. Type the following command, where ServerName (in either ServerName or ServerName\InstanceName format) is the name of the instance of SQL Server that hosts the databases for Team Foundation Server and DatabaseName is the name of the configuration database (by default, TFS_Configuration):

    **TFSConfig Accounts /ResetOwner /SQLInstance:**ServerName **/DatabaseName:**DatabaseName

    If you specify the configuration database, this command will change the ownership for all of the databases for Team Foundation Server.

Update All Service Accounts

You must update the service account for Team Foundation Server (TFSService) and the data sources account (TFSReports). Even if these accounts have not changed, you must update the information to help ensure that the identity and the format of the accounts are appropriate for the new server.

To update service accounts

  1. Open a Command Prompt window, and change directories to Drive:\%programfiles%\ Microsoft Team Foundation Server 2010\Tools.

  2. At the command prompt, type the following command to add the service account for Team Foundation, where DatabaseName is the name of the configuration database (by default, TFS_Configuration):

    **TfsConfig Accounts /add /AccountType:ApplicationTier /account:**AccountName **/SQLInstance:**ServerName **/DatabaseName:**DatabaseName

  3. At the command prompt, type the following command to add the data sources account:

    **TfsConfig Accounts /add /AccountType:ReportingDataSource /account:**AccountName **/SQLInstance:**ServerName **/DatabaseName:**DatabaseName

    For more information, see Accounts Command.

Configure the Application-Tier Server

After you prepare the servers for your application and data tiers, you must configure the application tier on the new server using the Application-Tier Only Wizard.

To configure a server as the application-tier server

  • Open the administration console, and restart the application-tier only wizard.

    For more information and step-by-step procedures, download the most recent version of the installation guide for Team Foundation from the following page on the Microsoft Web site, and follow the instructions for using the application-tier only wizard: Installation Guide for Team Foundation.

Update the URL for the Application-Tier Server

If the new application-tier server has a different name from the original server, you update the URL in the administration console.

To update the URL for the application-tier server

  1. Open the administration console for Team Foundation.

    For more information, see Open the Team Foundation Administration Console.

  2. In the navigation bar, click Application Tier, and then click Change URLs.

    The Change URLs window opens.

  3. In Notification URL, type the URL for the new application-tier server, and then click OK.

Configure SharePoint Products

As part of moving to a new server, you must install the extensions for SharePoint Products on your single-server deployment. You must also reconfigure the settings for the SharePoint Web applications that the deployment uses.

To install extensions and configure the settings for SharePoint Web applications

  1. Open the installation guide, and follow the instructions to install the Team Foundation Server Extensions for SharePoint Products on the server.

    For more information, see Extensions for SharePoint Products.

  2. Open the administration console for Team Foundation.

  3. In the navigation bar, click SharePoint Web Applications.

  4. In the SharePoint Web Applications list, click the Web application whose server has changed as part of moving to a new server, and then click Change SharePoint Web Application.

  5. In Web Application URL and Central Administration URL, change the values to reflect the URLs on the new server. If necessary, change the value of Default location for team project collection sites to the new default location for this Web application.

  6. Click OK.

  7. If Team Foundation Server is on a different server than SharePoint Products, you must also configure access to Team Foundation Server by opening in the administration console that is on the server that is running SharePoint Products and expanding the Extensions node.

    For more information about how to configure SharePoint Web applications as part of your deployment, see Add a SharePoint Web Application to Your Deployment and Interactions Between SharePoint Products and Team Foundation Server.

  8. If your deployment topology and security requirements allow it, add the service account for Team Foundation (TFSService) to the Farm Administrators group.

    For more information, see Interactions Between SharePoint Products and Team Foundation Server and Service Accounts and Dependencies in Team Foundation Server.

Configure Reporting and Analysis Services

You can skip this procedure if you are not using a server that is running SQL Server Reporting Services as part of your deployment. If your deployment uses a report server, you must redirect Team Foundation Server to its location, restart the warehouse, and manually rebuild the database for Analysis Services. For more information about how to rebuild the database for Analysis Services, even if you are not moving your deployment, see Rebuild the Data Warehouse and Analysis Services Cube.

Note

You must complete this procedure even if you restored the TFS_Warehouse and TFS_Analysis databases, as described in the previous section.

To reconfigure reporting and Analysis Services

  1. Open the administration console for Team Foundation.

  2. In the navigation bar, click Reporting.

  3. On the Reporting page, click Edit.

  4. In the Take Offline dialog box, click OK.

    The Reporting Services dialog box opens.

  5. Select the Use Report Server check box.

  6. Click the Warehouse tab, and, in Server, type or click the name of the report server.

  7. In Database, type the name of the warehouse database for Team Foundation Server.

    By default, this database is named TFS_Warehouse.

  8. (Optional) Click Test Connection to make sure that the database that you specified is valid.

  9. Click the Analysis Services tab.

  10. In the Server list, type or click the name of the server that is running SQL Server Analysis Services.

  11. In Database, type the name of the Analysis Services database for Team Foundation Server.

    By default, the name of this database is TFS_Analysis.

  12. If you are not using the default instance for the database, select the Specify nondefault instance check box, and then type or click the name of the instance.

  13. (Optional) Click Test Connection to make sure that the database that you specified is valid.

  14. In Username and Password, type the account name and password (if any) for the data sources account (TFSReports).

  15. On the Reports tab, in the Server list, type or click the name of the report server, and then click Populate URLs.

  16. In Username and Password, type the account name and password (if any) for the data sources account (TFSReports).

  17. In Default Path, type the relative path for storing reports, and then click OK.

  18. In the administration console, click Start Jobs to restart reporting.

  19. Open a Command Prompt window, and change directories to %ProgramFiles%\Microsoft Team Foundation Server 2010\Tools.

  20. Type the following command to rebuild the database for Analysis Services:

    TFSConfig RebuildWarehouse /AnalysisServices /ReportingDataSourcePassword:Password

    Password is the password for the data sources account for Reporting Services (TFSReports).

  21. Wait until the command is successfully completed.

  22. On the report server, open Internet Explorer, type the following string in the Address bar, and then press ENTER:

    https://localhost:8080/tfs/TeamFoundation/Administration/v3.0/WarehouseControlService.asmx

    The ControllerService page opens.

  23. Click GetWarehouseStatus, and then click Invoke.

    Important

    The service should return a value of Idle, which indicates that the cube is not being processed. If a different value is returned, repeat this step until Idle is returned.

  24. Return to the ControllerService page, click Run, and then click Invoke.

    This step initiates processing. The service returns True when it has successfully started the controller and False if the warehouse is still being processed.

  25. To determine when the warehouse has been processed, return to the ControllerService page, click GetWarehouseStatus, and then click Invoke.

    Processing is completed when the GetWarehouseStatus service returns a value of Idle.

Verify Permissions for Users, Groups, and Service Accounts

After you move to new hardware, make sure that all users, groups, and service accounts for your deployment are configured with the permissions that they require to function correctly on each server. Some permissions cannot be automatically migrated. For example, Team Foundation administrators must be members of the local Administrators group on the application-tier server to open the administration console, so you must add manually them to that group.

To verify permissions

Configure Project Server Integration

You can skip this procedure if the deployment that you are moving is not integrated with Microsoft Project Server. For more information, see Microsoft Team Foundation Server 2010 and Microsoft Project Server Integration Feature Pack.

If you intend to continue integration between the projects and collections and Project Server, you must register the instance of Project Web Access or Project Web App (PWA) with the application-tier server for your moved deployment.

To integrate the moved deployment with Project Server

Refresh the Data Cache on Client Computers

To refresh the data cache on client computers

  • Log on to the server, and use the ClientService Web service to force clients to update the cache for tracking work items and for version control.

    For more information, see Refresh the Data Caches on Client Computers.

    Note

    If you restored your databases to a different point in time, you will also need to refresh the version control cache.

See Also

Tasks

Move Team Foundation Server from One Environment to Another

Move from a Single-Server to a Dual-Server Deployment

Move a Team Project Collection

Split a Team Project Collection

Concepts

Team Foundation Server Move Types

Team Foundation Server Architecture