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

The most common type of Team Foundation Server move is the restoration-based move. This is where you configure a new installation of Team Foundation Server on new hardware and then restore the data from your original Team Foundation Server deployment to the new environment. The following examples are restoration-based move types:

  • Moving from a single-server Team Foundation Server deployment in a workgroup to a single-server Team Foundation Server in a different workgroup.

  • Moving from a single-server Team Foundation Server deployment in a domain to another single-server Team Foundation Server deployment in the same domain.

  • Moving from a dual-server Team Foundation Server deployment in a domain to another dual-server Team Foundation Server deployment in the same domain.

  • Restoring data from one Team Foundation data-tier server to a new Team Foundation data-tier server (dual-server deployments only).

Before you move your Team Foundation Server deployment, you must plan for the restoration-based move. A restoration-based move has many steps. This topic provides links to some of the steps. Read through and consider whether you want to print all the required steps before you start the move. To complete a restoration-based move, you need to be able to install new instances of Team Foundation Server, back up and restore data, re-create or migrate user accounts and service accounts, and reconfigure your servers.

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 new domain security groups, you must have appropriate domain permissions in the Active Directory domain.

Prepare For a Restoration-Based Move

Before you can move your Team Foundation Server, you must back up the Team Foundation Server databases.

To prepare the original Team Foundation Server deployment for a restoration-based move

  1. Back up all the Team Foundation Server databases.

    For more information about how to back up Team Foundation Server, see How to: Back Up a Team Foundation Server.

    Note

    If you have created any Windows SharePoint Services custom site definitions, custom site templates, or custom Web parts, and you want to keep your customizations, you must back them up. For more information, see the Microsoft Web site (https://go.microsoft.com/fwlink/?LinkId=63543).

  2. Back up the Reporting Services encryption key. Make sure that you store the encryption key in a secure location on a different computer from the Team Foundation Server and that this key can be accessed by the new deployment.

    For more information about how to back up the encryption key, see How to: Back Up the Reporting Services Encryption Key.

Install Team Foundation Server on the New Hardware

After backing up your Team Foundation Server data, you must install Team Foundation Server on the computer to which you want to move Team Foundation Server.

Note

If you want to move your Team Foundation Server from a single-server to a dual-server deployment, see How to: Move from a Single-Server to a Dual-Server Deployment.

To install and prepare the new Team Foundation Server for a restoration-based move

  1. Install Team Foundation Server in the new environment and make sure it is operational. For detailed instructions, see the Team Foundation Server Installation Guide, available from the Microsoft Web site (https://go.microsoft.com/fwlink/?linkid=40042).

    Important

    If the original server had Team Foundation Server Service Pack 1 (SP1) installed, you must install SP1 on the new Team Foundation Server before continuing to step 2.

  2. On the new Team Foundation application-tier, retrieve and save a list of the Reporting Service installation IDs.

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

      drive:\%ProgramFiles%\Microsoft SQL Server\90\Tools\binn\

    2. Run RSKeyMgmt -l.

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

  3. Click Start, click Administrative Tools, click Services, select the TFSServerScheduler service, and then click Stop if the service is not already stopped.

  4. Select the SharePoint Timer Service, and then click Stop.

    Important

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

  5. Click Start, click Administrative Tools, and then click Internet Information Services (IIS) Manager.

  6. In the Explorer pane, expand the Application Pools node, right-click TFS App Pool, and then click Stop.

  7. In the Explorer pane, under the Application Pools node, right-click Report Server, and then click Stop.

  8. Click Start, click Programs, click Microsoft SQL Server 2005, click Configuration Tools, and then click Reporting Services Configuration.

  9. In Report Server Installation Instance Selection, make sure that the computer name is the name of the Team Foundation application-tier server and that the instance name is MSSQLSERVER, and then click Connect.

  10. In the Explorer pane, click Server Status.

  11. In the Report Server Status pane, in Instance Properties, click Stop.

Restore the Databases

After you stop the services, you can restore the Team Foundation Server data using the restore tools provided with SQL Server 2005.

Warning

You must restore all the databases to backups at the same time. Otherwise, the databases might become corrupted.

To open the Restore Database dialog box

  1. On the Team Foundation data-tier server, click Start, click All Programs, click 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.

  2. Select Database Engine for the Server type.

  3. Select the appropriate Server name and Authentication scheme for the server, provide a valid User name and Password if it is required by your SQL Server, and then click Connect.

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

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

  • ReportServer

  • ReportServerTempDB

  • STS_Content_TFS

  • TfsBuild

  • TfsIntegration

  • TfsVersionControl

  • TfsWarehouse

  • TfsWorkItemTracking

  • TfsWorkItemTrackingAttachments

  • TfsActivityLogging (optional)

Important

Do not restore the SharePoint Configuration Database (STS_Config_TFS) for restoration-based moves.

Note

You must upload any new custom site templates or Web parts created for custom process templates to SharePoint databases as part of the restore process.

To restore each database

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

  2. In the Restore Database dialog box, select From Device in the Source for restore area, and then click the ellipsis button ().

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

    The first backup you apply must be a full backup, followed by the transaction log backups, in the order they were created.

  4. In the Select the backup sets to restore area, select the backup sets to restore.

  5. From the left navigation pane, select Options, and then select the Overwrite the existing database box.

  6. Verify that the paths specified in the Restore the database files as area match your current database paths.

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

  7. Select the appropriate state from the Recovery state area.

  8. Perform one of the following steps:

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

    - or -

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

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

  10. If you are applying additional transaction logs, follow this procedure for each log backup in the order they were created starting from the one made after the full backup.

    For more information, see Applying Transaction Log Backups.

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

After restoring the Team Foundation Server databases, you must configure the Web.Config file with the name of the original Team Foundation data-tier server before you can use the TfsAdminUtil command-line tool to rename the data tier.

To modify the Web.Config file to reflect the original Team Foundation data-tier server name

  1. Modify the services web.config file and replace the Team Foundation data-tier name with the old Team Foundation data-tier name as follows:

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

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

    3. In the connection string value, under the appSettings node, change the Source parameter to use the original Team Foundation data-tier server name. For example, the following line must be modified from:

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

      To

      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

    The TfsAdminUtil RenameDT expects that the connection string in the services Web.config file refers to the old Team Foundation data tier server name. The server name must be restored to the web.config file for the command-line tool to run correctly.

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

    TfsAdminUtil RenameDT newTeamFoundationDataTierServerName

  3. If the new Team Foundation application-tier server has a different name than the original Team Foundation application-tier server, you must update the TFSIntegration database with the new Team Foundation application-tier server name, and then rename the application-tier service interface registration entries to point to the new Team Foundation application-tier server.

    Note

    This step is required only if the new Team Foundation application-tier server has a different name from the original Team Foundation application-tier server.

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

    2. Change directories to drive:\%ProgramFiles%\Microsoft Visual Studio 2005 Team Foundation Server\Tools.

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

      TfsAdminUtil ActivateAT newTeamFoundationApplicationTierServerName

Move User and Service Accounts

If you are moving your Team Foundation Server to a domain that does not trust the domain to which the original Team Foundation Server belonged, or if you are moving your Team Foundation Server from one workgroup to another, you must re-create service accounts and user accounts in the new Team Foundation Server environment. Additionally, you must re-create any local accounts from the old Team Foundation Server on the new Team Foundation Server.

Note

The account names created on the new Team Foundation Server deployment must match the names of the accounts from the original Team Foundation Server deployment. This includes both user and service accounts. These account names are used to identify and update the Team Foundation Server database records as part of the move process.

To move user accounts and service accounts

  1. On the new Team Foundation Server, open a Command Prompt window and change directories to drive:\%ProgramFiles%\Microsoft Visual Studio 2005 Team Foundation Server\Tools.

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

    TfsAdminUtil ChangeAccount OldDomainOrOldComputerName\OldTFSServiceAccount NewDomainOrNewComputerName\NewTFSServiceAccount NewPassword

    Note

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

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

    TfsAdminUtil ChangeAccount OldDomainOrOldComputerName\OldTFSReportingServiceAccount NewDomainOrNewComputerName\NewTFSReportingServiceAccount NewPassword

    Note

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

  4. On the old Team Foundation Server, open a Command Prompt window and change directories to drive:\%ProgramFiles%\Microsoft Visual Studio 2005 Team Foundation Server\Tools.

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

    TfsAdminUtil Sid

  6. Note or print the list of users generated by the TFSAdminUtil Sid command.

    This is the list of the users you might have to re-create on the new Team Foundation Server, either as local accounts or domain accounts.

  7. On the new Team Foundation Server, create any local accounts required to correspond with the local accounts on the old Team Foundation Server. If the old Team Foundation Server was on a domain that is not trusted by the new Team Foundation Server's domain, open Active Directory and create domain accounts that correspond with the domain accounts on the old Team Foundation Server.

    For more information about how to create accounts, see the Microsoft Web site (https://go.microsoft.com/fwlink/?LinkId=63542).

  8. On the new Team Foundation Server, open a Command Prompt window and change directories to drive:\%ProgramFiles%\Microsoft Visual Studio 2005 Team Foundation Server\Tools.

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

    TfsAdminUtil Sid /Change OldDomainOrOldComputerName NewDomainOrNewComputerName

    Note

    This command will update all user accounts on the Team Foundation 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. The TfsAdminUtil SID command can be run multiple times to change the SIDs of user accounts from different source domains that are not trusted by the new domain to the new domain. For more information, see Sid Command.

    Important

    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 Team Foundation Server into production before this synchronization is finished.

Restore Team Project Web Sites

You must restore any team projects Web sites to the new Team Foundation application-tier server.

To restore Windows SharePoint Services project sites on the new Team Foundation application-tier server

  1. Click Start, click Administrative Tools, and then click SharePoint Central Administration.

  2. On the Central Administration page, click Configure virtual server settings.

  3. On the Virtual Server List page, click Default Web Site.

  4. On the Virtual Server Settings page, click Manage content databases.

  5. On the Manage Content Databases page, click STS_Content_TFS.

  6. On the Manage Content Database Settings page, select Remove content database, and then click OK.

  7. On the Manage Content Databases page, click Add a content database.

  8. On the Add Content Database page, in Database Information, click Specify database server settings and in Database name, type STS_CONTENT_TFS.

  9. In Database Capacity Settings, in Number of sites before a warning event is generated, type 9000, and in Maximum number of sites that can be created in this database, type 15000, then click OK.

  10. (Optional) If you backed up any Windows SharePoint Services custom site definitions, custom site templates, or custom Web parts and you want to keep your customizations, restore these components now.

    For more information, see the Microsoft Web site (https://go.microsoft.com/fwlink/?LinkId=63543).

  11. Click Start, click Administrative Tools, click Services, select the SharePoint Timer Service, then click Start.

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

After restoring project Web sites, you must restore reporting services to the new Team Foundation application-tier server.

To restore and verify Report Server on the new Team Foundation Server

  1. Click Start, click Administrative Tools, and then click Internet Information Services (IIS) Manager.

  2. In the Explorer pane, under the Application Pools node, right-click Report Server, and then click Start.

  3. Click Start, click Programs, click Microsoft SQL Server 2005, click Configuration Tools, and then click Reporting Services Configuration.

  4. In Report Server Installation Instance Selection, make sure that the computer name is the name of the new Team Foundation application-tier server and that the instance name is MSSQLSERVER, and then click Connect.

  5. In the Explorer pane, click Server Status.

  6. In the Report Server Status pane, in Instance Properties, click Start.

  7. In the Explorer pane, click Database Setup.

  8. In the Database Connection pane, make sure that the name of the Team Foundation data-tier server is correct in Server Name, and then click Connect.

  9. On the SQL Server Connection Dialog dialog box, click OK.

  10. In the Database Connection pane, click Apply.

  11. On the SQL Server Connection Dialog dialog box, click OK.

  12. (For dual-server deployments only) In the Explorer pane, click Windows Service Identity. On the Windows Service Identity page, in the Built-in Service Account box, Network Service should be selected, but Apply is unavailable. To grant the Team Foundation application-tier server log on permissions to the SQL Server on the Team Foundation data-tier, in the Built-in Service box, select Local Service. Do not click Apply, but instead return to the Built-in Service box and re-select Network Service. When Network Service is selected and Apply is available, click Apply. In the SQL Server Connection Dialog dialog box, and then click OK.

  13. Restore the encryption key and remove previous instances of Report Server by doing one of the following:

    If you are running SQL Report Server Enterprise Edition

    1. In the Explorer pane of Reporting Services Configuration, click Encryption Keys.

    2. In the Explorer pane, click Encryptions Keys.

    3. On the Encryption Key page, click Restore.

    4. On the Encryption Key Information page, type the password for the encryption key file in Password, type or select the backup encryption key .snk file location in Key File, and then click OK.

    5. In the Explorer pane of Reporting Services Configuration, click Initialization.

    6. On the Initialization page, select the instance ID that corresponds with the name of the old Team Foundation data-tier server, click Remove, and then click OK.

      Note

      Do not remove the installation ID that you recorded in the "To save Reporting Service installation IDs and stop services" section of this document.

    If you are running SQL Report Server Standard Edition

    1. Close the Reporting Services Configuration tool.

    2. Click Start, click Run, type cmd, and then click OK to open a Command Prompt window.

    3. Change directories to drive:\%PROGRAMFILES%\Microsoft SQL Server\90\Tools\binn.

    4. Type the following command to view a list of Reporting Service instances:

      RSKeyMgmt -l

    5. After you review the list to find the name of the Reporting Service instance that corresponds with the name of the Team Foundation data-tier server, type the following command to remove that instance, where DTInstanceID is the name of the instance that corresponds with the name of the old Team Foundation data-tier server:

      RSKeyMgmt –r DTInstanceID

      Note

      Do not remove the installation ID that you recorded in the "To save Reporting Service installation IDs and stop services" section of this document.

    6. On the Team Foundation application-tier server, click Start, click All Programs, click Microsoft SQL Server, click Configuration Tools, and then click Reporting Services Configuration.

    7. In the Explorer pane, click Encryptions Keys.

    8. On the Encryption Key page, click Restore.

    9. On the Encryption Key Information page, type the password for the encryption key file in Password, type or select the backup encryption key .snk file location in Key File, and then click OK.

  14. Open Internet Explorer and connect to https://localhost/reports. In Contents, click TfsReportDS.

  15. In Connection string, update the Data source parameter with the new Team Foundation data-tier server name. In Connect using, select Credentials stored securely in the report,update the user name and password to reflect the new reporting services service account, and then click Apply.

  16. Under SQL Server Reporting Services, click Home.

  17. In Contents, click TfsOlapReportsDS.

  18. In Connection string, update the Data source parameter with the new Team Foundation data-tier server name. In Connect using, select Credentials stored securely in the report, update the user name and password to reflect the new reporting services service account, and then click Apply.

  19. Open a Command Prompt window and change directories to drive:\%ProgramFiles%\ Microsoft Visual Studio 2005 Team Foundation Server\Tools. Type the following command, where newDataTierServerName is the name of your new Team Foundation data-tier server, newTeamFoundationDataWarehouseName is the name of the data warehouse, TFSReportServiceAccount is the name of the reporting services service account, and TFSServiceAccount is the name of the Team Foundation Server service account:

    SetupWarehouse.exe -o -s newDataTierServerName -d newTeamFoundationDataWarehouseName -c warehouseschema.xml -ra TFSReportServiceAccount -a TFSServiceAccount

  20. On the Team Foundation data-tier server, click Start, click Programs, click Microsoft SQL Server 2005, and then click SQL Server Management Studio.

  21. On the Connect to Server dialog box, in Server type, select Database Engine, verify that the server name and authentication values are correct, and then click Connect.

  22. In the Object Explorer pane, expand Databases, expand TFSWarehouse, right-click dbo._WarehouseConfig, and then click Properties.

  23. In Table Properties - _WarehouseConfig, in Select a page, click Permissions.

  24. In Users or Roles, click Add.

  25. In Select Users or Roles, add the Reporting Services service account (referred to generically as TFSReports), and then click OK.

  26. In Table Properties - _WarehouseConfig, click OK.

  27. In the Object Explorer pane, click Connect, and select Analysis Services.

  28. On the Connect to Server dialog box, make sure that the server name and authentication values are correct, and then click Connect.

  29. In the Object Explorer pane, expand Databases, right-click TFSWarehouse, and then click Process.

  30. In Process Database - TFSWarehouse, click OK.

  31. On the Team Foundation application-tier server, change directories to https://localhost/reports.

  32. In Contents, click any project, click any one of the default reports in the project, and then verify that it appears correctly.

To restart services and verify operation

  1. On the new Team Foundation application-tier server, click Start, click Administrative Tools, and then click Internet Information Services (IIS) Manager.

  2. In the Explorer pane, expand the Application Pools node, right-click TFS App Pool, and then click Start.

  3. On the new Team Foundation application-tier server, click Start, click Administrative Tools, click Services, select the TFSServerScheduler service, and then click Start, if it is not started already. Select the SharePoint Timer Service, and then click Start.

  4. On the Team Foundation data-tier server, connect to https://localhost:8080/WorkItemTracking/v1.0/ClientService.asmx.

  5. In ClientService, click StampWorkitemCache.

  6. In StampWorkitemCache, click Invoke.

    Note

    The StampWorkitemCache invocation will not return any data.

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 Windows SharePoint Services and Reporting Services users and groups to the corresponding users and groups on the new Team Foundation application-tier server. Finally, you will have to re-create any query-bound reports or documents, as pre-existing queries will not be able to connect to your new Team Foundation Server deployment.

To update build computers with new domain settings

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

    For more information, see Administering Team Foundation Build.

  2. After you update the build computers with the new settings, test the build settings by starting a test build.

To migrate Windows SharePoint Services and Reporting Services groups and users

  • Unfortunately there are no tools currently to automatically migrate Windows SharePoint Services and Reporting Services users and groups and their role memberships across different domains. Both Windows SharePoint Services and SQL Report Server will show the users and groups and their role memberships for each site or report folder. Depending on your move and the Active Directory trust relationship with your previous deployment, those users and groups might not be valid after the move. For those that are not valid, you must create new, valid user and group memberships in the roles in the new deployment.

To create Microsoft Project or Microsoft Excel reports

  • After you have finished moving your Team Foundation Server deployment to the new hardware, you will have to 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 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

Other Resources

Managing Team Foundation Server in an Active Directory Domain