How to: Move Your Deployment of Team Foundation Server from One Hardware Configuration to Another

You can move an instance of Visual Studio Team System 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. For a restoration-based move, you must also ensure that the software update levels for the version of Team Foundation Server and SQL Server that you are moving from and to match exactly. Otherwise, your restored deployment might not operate correctly.

Important noteImportant Note:

As you plan to move a deployment, 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.

To help prepare for a restoration-based move, you should read through all the required steps and consider printing this topic. You should also review the information that it provides through links and determine which steps will vary based on your specific configuration. For example, your deployment might have SQL Server Analysis Services on a different server from the SQL Server databases. In this situation, you must configure those servers separately.

Note

You can migrate reporting databases from SQL Server 2005 to SQL Server 2008, but this change adds complexity to the move process. You should consider moving or upgrading these databases before you move the deployment. For more information, see the following page on the Microsoft Web site: Upgrading a Report Server Database.

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

  • Prepare For a Restoration-Based Move

  • Install Team Foundation Server on the New Hardware

  • Back up the WSS_Config Database on the New Server

  • Restore the Databases

  • Restore Web Sites for Team Projects

  • Restore and Test SQL Report Server, Reporting Services, and Default Reports

  • Rename the Data-Tier Server and Activate the Application-Tier Server

  • Rebuild the Team System Cube

  • Delete the Version Control Cache

  • Move User and Service Accounts

  • Restart Services

  • Refresh the Data Cache on Client Computers

  • Next Steps

Required Permissions

To complete these procedures, you must be a member of the Administrators group on the old and new servers and a member of the Team Foundation Administrators group. If you are creating security groups in an Active Directory domain, you must have appropriate permissions in that domain.

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

  • 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 edit web.config files, you might need to start the text editor as an administrator by clicking Start, clicking All Programs, right-clicking the editor, and then clicking Run as administrator.

  • To access Report Manager, reports, or Web sites for SQL Server 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 Microsoft Web site.

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 How to: 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 and Technologies that you want to keep. For more information, see these pages on the Microsoft Web site: Backup and Restore Options for Windows SharePoint Services 2.0 or Recommendations for data protection and recovery for Windows SharePoint Services 3.0.

  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 How to: Back Up the Reporting Services Encryption Key.

Install Team Foundation Server and Prepare the New Hardware

After you back up the databases, you must install Team Foundation Server on the computer to which you want to move your deployment.

To prepare the new server for a restoration-based move

  1. Install Team Foundation Server on the new hardware, and make sure that the server is operational.

    For detailed instructions and information about prerequisites, see the installation guide for Team Foundation on the Microsoft Web site.

    Important noteImportant Note:

    Before you install Team Foundation Server, you must first install SQL Server on the computer to which you want to restore the data for your deployment. The version of SQL Server that you install must exactly match the version that was running on the old data-tier server, including service pack level, collation settings, and language edition. If the match is not exact, you might not be able to restore the data.

  2. On the server that is running SQL Server Reporting Services, retrieve and save a list of the installation IDs for Reporting Services.

    1. Open the Command Prompt window, and change directories to the following directory:

      %ProgramFiles%\Microsoft SQL Server\90\Tools\bin\

      Note

      For SQL Server 2008, this directory will vary based on the edition. For x86-based systems, the default directory is %ProgramFiles%\Microsoft SQL Server\100\Tools\bin. For x64-based systems, the default directory is Program Files(x86)\Microsoft SQL Server\100\Tools\bin.

    2. Run RSKeyMgmt -l.

    3. Note the installation IDs, and either print the list or save it in a safe location.

  3. Log on to the appropriate server, open Computer Manager, and stop the services and application pools in the following table in the order specified:

    Log on to the server that hosts this program

    Stop this component

    SharePoint Products and Technologies

    • SharePoint Timer Service or Windows SharePoint Services Timer

    • Default Web Site or Team Web site

    Application tier

    • Visual Studio Team Foundation Server Task Scheduler Service

    • Microsoft Team Foundation Server Application Pool

    SQL Server Reporting Services

    • SQL Server Reporting Services (TFSINSTANCE)

    • ReportServer or ReportServer$InstanceName (SQL Server 2005 users only. You do not need to complete this step if you are using SQL Server 2008.)

    • Default Web Site or Report Manager Web site

    Important noteImportant Note:

    To move user accounts and service accounts in a restoration-based move, the new deployment of Team Foundation Server must be in a stopped state. If you restart Team Foundation Server after you restore data but before you move user accounts and service accounts, you could cause users who are targeted for migration to be marked as deleted in the TFSIntegration database. This problem occurs when the group security service cannot find the user’s system identification (SID) during synchronization with Active Directory.

    For more information, see How to: Stop and Start Services, Application Pools, and Web Sites.

Back up the WSS_Config Database on the New Server

Before you restore data to the new databases for Team Foundation Server, you should back up the configuration database for SharePoint Products and Technologies (WSS_Config) on the new server. If you try to restore the database from the old server to the new server, the database might be overwritten or corrupted during the restoration process. 

To back up the WSS_Config database

Restore the Databases

After you stop the services, you can restore the data for Team Foundation Server by using the tools that SQL Server provides.

Warning

You must restore all the databases to the same point in time. Otherwise, they might become corrupted.

To open the Restore Database dialog box

  1. On the new data-tier server, click Start, point to All Programs, point to Microsoft SQL Server, and then click SQL Server Management Studio.

    Note

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

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

  3. In the Server name list, click or type the appropriate server.

  4. In the Authentication list, click the appropriate scheme.

  5. In User name, type the user name of a valid account.

  6. In Password, type the password of the account if SQL Server requires it, and then click Connect.

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

Important noteImportant Note:

For restoration-based moves, do not restore the configuration database for SharePoint Products and Technologies (WSS_Config) from the old server to the new server.

Complete the "To restore each database" procedure for each of the following databases:

  • 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.

  • The content database for SharePoint Products and Technologies (STS_Content_TFS or WSS_Content)

    Note

    The name of the database that contains data for SharePoint Products and Technologies will vary depending on the version of SharePoint Products and Technologies that is installed and whether the person who installed it customized the name. Additionally, if SharePoint Products and Technologies is installed on a separate server from Team Foundation Server, these databases might not be present on the data-tier server. If they are not present, you must manage the backup, restoration, and configuration of SharePoint Products and Technologies and its databases separately from Team Foundation Server. However, you should synchronize the maintenance of the databases to avoid synchronization errors.

  • TfsBuild

  • TfsIntegration

  • TfsVersionControl

  • TfsWarehouse

  • TfsWorkItemTracking

  • TfsWorkItemTrackingAttachments

  • TfsActivityLogging (optional)

    Note

    As part of the restore process, you must upload any custom site templates or Web parts created for custom process templates to databases for SharePoint Products and Technologies.

To restore each 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 apply must be a full backup, followed by 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.

  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.

    This step is important if you are restoring the database to a different drive.

  7. Under Recovery state, click the appropriate state.

  8. Perform one of the following steps:

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

    • If you are applying additional transaction logs, click Leave the database non-operational.

  9. Click OK to close the Restore Database dialog box and restore the database.

  10. If you are applying additional transaction logs, follow this procedure for each set of log backups in the order in which they were created. Start with the one made after the full backup.

    For more information, see "Applying Transaction Log Backups" on the Microsoft Web site.

Restore Web Sites for Team Projects

You must redirect SharePoint Products and Technologies to the new content database.

To restore Web sites for team projects

Restore and Test SQL Server Reporting Services and Default Reports

After you restore project Web sites, you must restore SQL Server Reporting Services to the new application-tier server.

To restore and verify Reporting Services in SQL Server

  1. On the server that is running Reporting Services, open Computer Manager, and start the ReportServer or ReportServer$InstanceName application pool.

    Note

    You do not need to complete this step if you are using SQL Server 2008.

  2. Click Start, point to All Programs, point to Microsoft SQL Server, point to Configuration Tools, and then click Reporting Services Configuration.

  3. In the Explorer pane, click Database Setup.

  4. The Database Connection pane opens.

  5. In Server Name, verify that the name of the data-tier server is correct, and then click Connect.

  6. In the SQL Server Connection Dialog dialog box, click OK.

  7. In the Database Connection pane, click Apply.

  8. If you have a dual-server deployment, perform the following steps:

    1. In the Explorer pane, click Windows Service Identity.

      The Windows Service Identity page opens.

    2. In the Built-in Service Account list, click Local Service.

      The Apply button becomes available. Do not click it.

    3. In the Built-in ServiceAccount list, click Network Service, and then click Apply.

    4. In the SQL Server Connection Dialog dialog box, click OK.

  9. Open Computer Manager, and start Reporting Services.

    Note

    If you are using a named instance, this service name will be SQL Server Reporting Services (InstanceName).

  10. Close the Reporting Services Configuration tool.

  11. Open a Command Prompt window, and change directories to the tools directory for your version of SQL Server. For SQL Server 2005, the default directory is %ProgramFiles%\Microsoft SQL Server\90\Tools\bin. For SQL Server 2008, this directory will vary based on the edition. For x86-based systems, the default directory is %ProgramFiles%\Microsoft SQL Server\100\Tools\bin. For x64-based systems, the default directory is Program Files(x86)\Microsoft SQL Server\100\Tools\bin.

  12. Type the following command to list installation IDs of Reporting Services:

    RSKeyMgmt -l

  13. In the list, find the installation ID that corresponds to the new data-tier server.

  14. Type the following command to remove that installation ID, where DTInstanceID corresponds to the old data-tier server:

    RSKeyMgmt –r DTInstanceID

    Note

    Do not remove the installation ID that corresponds to the new data-tier server.

  15. On the server that is running Reporting Services, click Start, point to All Programs, point to Microsoft SQL Server, point to Configuration Tools, and then click Reporting Services Configuration.

  16. In the Explorer pane, click Encryption Key.

  17. On the Encryption Key page, click Restore.

    The Encryption Key Information page opens.

  18. In Password, type the password for the encryption key file**.**

  19. In Key File, type or click the location of the backup encryption key (.snk file), and then click OK.

Rename the Data-Tier Server and Activate the Application-Tier Server

After you restore Reporting Services, you must use the TfsAdminUtil command to configure connections and rename the data-tier server.

To rename the data-tier server and update the integration database with the name of the new application-tier server

  1. Log on to the appropriate server, open Computer Manager, and start the application pools and programs in the following table:

    Log on to the server that hosts this program

    Start this component

    Application tier

    • Microsoft Team Foundation Server Application Pool

    Reporting Services

    • ReportServer or ReportServer$InstanceName (application pool)

      NoteNote:
      You do not need to complete this step if you are using SQL Server 2008.
    • SQL Server Reporting Services (TFSINSTANCE)

  2. Open the Command Prompt window, change directories to %ProgramFiles%\Microsoft Visual Studio 2008 Team Foundation Server\Tools, and type the following command:

    TfsAdminUtil ConfigureConnections /view

  3. Review the settings for /ReportsURI and /ReportServerUri. If the server for Reporting Services has changed from the information shown, you must reconfigure those connections by typing the following command:

    **TfsAdminUtil ConfigureConnections /ReportsUri:NewReports/ReportServerUri:**NewReportServer

    Note

    If you are using a named instance, you must specify the named instance as part of the values for Reports and ReportServer. Do not eliminate or change the name of the named instance.

    For example, if Reporting Services were running on the old application-tier server and had been moved to the new application-tier server, you would need to provide the new uniform resource indicator (URI) for /ReportsUri and /ReportServerUri. For more information, see ConfigureConnections Command.

  4. (Optional) After you reconfigure the connections, type the following command to review the changes and ensure that they have taken effect:

    TfsAdminUtil ConfigureConnections /view

  5. In the services web.config file, replace the name of the new data-tier server with the name of the old data-tier server as follows:

    1. On the new application-tier server, open a Command Prompt window, and change directories to %ProgramFiles%\Microsoft Visual Studio 2008 Team Foundation Server\Web Services\Services.

    2. In Notepad or any text-based editor, open the web.config file in this directory.

    3. Under the appSettings node, find the connection string element, and change the value of the Source parameter to the name of the old data-tier server. For example, you must modify the following element:

      Application Name=TeamFoundation;Data Source=NewTeamFoundationDataTierServerName;Initial Catalog=TfsIntegration;Integrated Security=True;Persist Security Info=False

      After your changes, the element should resemble the following string:

      Application Name=TeamFoundation;Data Source=OldTeamFoundationDataTierServerName;Initial Catalog=TfsIntegration;Integrated Security=True;Persist Security Info=False

    4. Save the web.config file, and close Notepad.

      Note

      For the TfsAdminUtil RenameDT command to run correctly, the connection string in the services web.config file must refer to the name of the old data-tier server.

  6. Open the Command Prompt window, change directories to %ProgramFiles%\Microsoft Visual Studio 2008 Team Foundation Server\Tools, and type the following command:

    TfsAdminUtil RenameDT NewTeamFoundationDataTierServerName

    Important noteImportant Note:

    For the RenameDT command to succeed, the application pools and programs in the previous step must be running. This requirement is new in Visual Studio Team System 2008 Team Foundation Server.

  7. After the command finishes, stop the following application pools and programs:

    • Microsoft Team Foundation Server Application Pool

    • ReportServer or ReportServer$InstanceName

    Note

    You do not need to complete this step if you are using SQL Server 2008.

    • SQL Server Reporting Services (TFSINSTANCE)

    Note

    After you run the RenameDT command, you must stop the services that it requires before you continue with the next steps.

  8. If the new application-tier server has a different name from the old application-tier server, update the TFSIntegration database with the name of the new server. Then update the registration entries in the service interface for the application tier to point to the new server.

    1. On the new application-tier server, open a Command Prompt window.

    2. Change directories to %ProgramFiles%\Microsoft Visual Studio 2008 Team Foundation Server\Tools.

    3. At the command prompt, type the following command:

      TfsAdminUtil ActivateAT NewTeamFoundationApplicationTierServerName

Rebuild the Team System Cube

After you configure connections and rename the data-tier server, you must rebuild the Team System cube for Team Foundation. The Team System cube supports SQL Server Reporting Services and contains data from the relational database of the data warehouse for Team System. For more information, see Understanding the Data Warehouse Architecture.

To rebuild the Team System cube in the new deployment

Delete the Version Control Cache

After you rebuild the Team System cube, you must delete the version control cache on the application-tier server (and any proxy servers) to force synchronization with the new data-tier server.

To delete the version control cache

  1. On the application-tier server, open the %ProgramFiles%\Microsoft Visual Studio 2008 Team Foundation Server\Web Services\VersionControl directory.

  2. Delete the contents of the Data subdirectory, but do not delete the Data subdirectory itself.

    For more information, see How to: Delete the Version Control Cache on the Application-tier Server.

  3. Repeat this procedure on any server in your deployment that is running Team Foundation Server Proxy.

Move User and Service Accounts

You must re-create service accounts, user accounts, and any local accounts if you are moving your deployment from one workgroup to another. You must also re-create these accounts if you are moving your deployment to a domain that does not trust the domain to which the old deployment belonged.

Note

The account names that you create in the new deployment must match the names of the accounts from the old deployment. This requirement includes both user and service accounts. These account names are used to identify and update the database records for Team Foundation Server as part of the move process.

To move user accounts and service accounts

  1. On the server that is running Reporting Services, open Computer Manager, and start the following components:

    • ReportServer or ReportServer$InstanceName (application pool)

    Note

    You do not need to complete this step if you are using SQL Server 2008.

    • SQL Server Reporting Services (TFSINSTANCE)
  2. On the new application-tier server, open a Command Prompt window, and change directories to %ProgramFiles%\Microsoft Visual Studio 2008 Team Foundation Server\Tools.

  3. At the command line, type the following command:

    TfsAdminUtil ChangeAccount OldDomainOrComputerName\OldTFSServiceAccount NewDomainOrComputerName\NewTFSServiceAccount NewPassword

    Note

    Ignore any warning that says that the service account does not exist or that the account is not a member of the data warehouse role.

  4. At the command line, type the following command:

    TfsAdminUtil ChangeAccount/ra OldDomainOrComputerName\OldTFSReportingServiceAccount NewDomainOrComputerName\NewTFSReportingServiceAccount NewPassword

    Note

    Ignore any warning that says that the service account is not a member of the data warehouse role or that prompts you to add the account to the service accounts group.

  5. On the old application-tier server, open a Command Prompt window, and change directories to %ProgramFiles%\Microsoft Visual Studio 2008 Team Foundation Server\Tools.

  6. At the command line, type the following command:

    TfsAdminUtil Sid

  7. Note or print the list of users that appears.

    You might have to re-create this list of users on the new application-tier server, either as local accounts or domain accounts.

  8. On the new application-tier server, create any local accounts that are required to correspond with the local accounts on the old application-tier server. If the old application-tier server was on a domain that the new application-tier server's domain does not trust, open Active Directory, and create domain accounts that correspond to the domain accounts on the old application-tier server.

    For more information, see "Creating user and group accounts" on the Microsoft Web site.

  9. On the new application-tier server, open a Command Prompt window, and change directories to %ProgramFiles%\Microsoft Visual Studio 2008 Team Foundation Server\Tools.

  10. At the command line, type the following command:

    TfsAdminUtil Sid /Change OldDomainOrComputerNameNewDomainOrComputerName

    This command updates all user accounts on the application-tier server that uses SIDs for the new domain or workgroup. If you must update user accounts by using information from more than one source (for example, from another domain and from local accounts), you will have to specify additional parameters. You can run TfsAdminUtil SID multiple times to change the SIDs of user accounts from different source domains that the new domain does not trust. For more information, see Sid Command.

    Important noteImportant Note:

    When you restart Team Foundation Server, you might have to wait for up to an hour before the Group Security Service will re-synchronize with Active Directory to update user account information in the TFSIntegration database. Do not put the new application-tier server into production before this information is synchronized.

Restart Services

To resume operations, you must restart the services on which Team Foundation depends.

To restart services

  • Log on to the appropriate server, open Computer Manager, and start the components in the following table, in the order specified:

    Log on to the server that hosts this program

    Start this component

    SharePoint Products and Technologies

    • SharePoint Timer Service or Windows SharePoint Services Timer

    Application tier

    • Visual Studio Team Foundation Server Task Scheduler Service

    • Microsoft Team Foundation Server Application Pool

Refresh the Data Cache on Client Computers

To refresh the data cache on client computers

  • Use the ClientService Web service to force clients to update the cache for tracking work items the next time that they connect to the application-tier server. To update the version control cache, each user must update the client computer by using the tf workspaces command.

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

Next Steps

Depending on your Team Foundation deployment, you might have to update TeamBuild.proj files with the new settings. Additionally, you might have to migrate users and groups in SharePoint Products and Technologies and Reporting Services to the new application-tier server. Finally, you must re-create any query-bound reports or documents because you will not be able to connect to your new deployment by using queries from the old deployment.

To update build computers with new domain settings

  1. If you want to use an existing computer that is running Team Foundation Build in your new deployment, open the TeamBuild.proj file on that computer, and update the settings for the new computer and a new drop location.

    For more information, see Administering Team Foundation Build.

  2. After you update the build computers with the new settings, start a test build to verify the new configuration.

To migrate users and groups in SharePoint Products and Technologies and Reporting Services

  • After you move your deployment, you might need to manually migrate user accounts, groups, and role memberships in SharePoint Products and Technologies and Reporting Services across domains to the new deployment. The Active Directory trust relationship with the old deployment determines how much information you must migrate. Both SharePoint Products and Technologies and Reporting Services will show the users, groups, and their role memberships for each site or report folder. For more information, see Managing Permissions and Trusts and Forests Considerations for Team Foundation Server.

To create reports in Microsoft Project or Microsoft Excel reports

  • After you move your deployment, re-create any Microsoft Project or Microsoft Excel files that connect to Team Foundation Server. For more information, see Team Foundation Server Reporting.

See Also

Tasks

How to: Move Your Deployment of Team Foundation Server from One Environment to Another

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

Concepts

Team Foundation Server Move Types

Application-Tier Server Requirements for Team Foundation

Data-Tier Server Requirements for Team Foundation

Managing Team Foundation Server in a Workgroup

Team Foundation Server Security Architecture

Other Resources

Managing Team Foundation Server in an Active Directory Domain