Move Team Foundation Server from One Environment to Another

In contrast to restoration-based moves, environment-based moves do not involve moving Visual Studio Team Foundation Server data from one set of hardware to another. Instead, an environment-based move involves changing the environment of Team Foundation Server itself. The most common environment-based move scenario is moving from a Team Foundation Server deployment in a workgroup to a Team Foundation Server deployment in a domain. The procedures in the following section specifically support this scenario.

Important

The procedures in this topic are specific for changing the environment of a deployment, not the hardware. If you plan on changing any of the hardware as part of changing the environment, you must follow different steps. For more information, see Move from a Single-Server to a Dual-Server Deployment and Move Team Foundation Server from One Hardware Configuration to Another.

Before you move your Team Foundation Server deployment, you must plan and prepare for the environment-based move. There are many steps that must be completed in an environment-based move, and some of them are linked to through this topic. Read through and consider whether you want to print all the steps that are required before you start the move. To complete an environment-based move, you must be able to perform steps such as stopping and starting services, re-creating or migrating user accounts and service accounts, and reconfiguring your servers.

To move your deployment of Team Foundation Server from a workgroup to a domain, you must complete the procedures in the following sections in the sequence listed:

  1. Stop Services that Team Foundation Server Uses

  2. Back Up Data

  3. Join the Application-Tier and Data-Tier Servers to the Domain

  4. Configure SharePoint Products for the New Environment

  5. Move User and Service Accounts

  6. Configure Reporting and Analysis Services

  7. Configure Project Server Integration

  8. Restart Services that Team Foundation Server Uses

Important

If System Center Virtual Machine Manager (SCVMM) is part of your installation, you must update it at the same time. For more information, see How to: Join the SCVMM Server to another Domain.

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, and you must have permissions to join a server to the Active Directory domain. If you are creating domain security groups, you must have appropriate domain permissions in the Active Directory domain. If you are configuring SharePoint Products as part of your deployment, you must be a member of the Farm Administrators group.

In addition to these permissions, you might need 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 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.

Stop Services that Team Foundation Server Uses

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 Data

To back up data for Team Foundation

Join the Application-Tier and Data-Tier Servers to the Domain

To join each application-tier and data-tier server to the domain

  1. On each application-tier and data-tier server, click Start, right-click My Computer or Computer, and then click Properties.

  2. Under Computer Name, domain, and workgroup settings, click Change settings.

  3. In the System Properties dialog box, click the Computer Name tab, and then click Change.

  4. In the Computer Name(/Domain) Changes dialog box, click Domain.

  5. Type the name of the domain to which you want to join the server, and then click OK.

    If you are prompted to provide the user name and password of an account that has permissions to join this computer to the domain, provide the appropriate credentials, and then click OK.

  6. Click OK.

  7. Restart the computer for the domain change to take effect.

    Note

    After you restart the computer, a warning might appear that services or drivers could not be started. This error will be resolved when you complete the next procedure. Click OK to ignore this error.

Configure SharePoint Products for the New Environment

If you are changing the environment to one where there is no trust with your previous environment, you might need to configure SharePoint Products before it will operate correctly in the new environment. Information about users imported from directory services is available on SharePoint sites from the Select People and Groups dialog box, also known as the People Picker Web control. Site administrators and other users use the People Picker to select people and groups when assigning permissions. When information about users is located on multiple forests or on a forest without a trust relationship for all users, additional steps might be necessary to ensure that all people and groups are available from this Web control.

Skip this procedure if you are not using SharePoint Products in your deployment, if your new environment has a two-way trust to the old environment, or if no errors for your SharePoint Web application appear in the administration console for Team Foundation.

Important

If you are moving to a non-trusted domain, you must also update the service account and the farm accounts that SharePoint Products uses. For more information, see the following topic on the Microsoft Web site: How to change service accounts and service account passwords in Microsoft Office SharePoint Server 2007 and in Windows SharePoint Server 3.0.

To configure SharePoint Products

  1. On every server that is part of the SharePoint farm that supports your deployment of Team Foundation Server, open a Command Prompt window, and change directories to %COMMONPROGRAMFILES%\microsoft shared\web server extensions\12\bin.

  2. Type the following command, where Key is the encryption key you want to use in your deployment of SharePoint Products:

    stsadm.exe -o setapppassword -password Key

    Note

    This key is an encryption string that is used to encrypt the password for the account that is used to access the forest or domain. The encryption string must be the same for every server in the farm, but a unique string should be used for each farm.

  3. Type the following command, where domain:DNSName is the target forest or domain and its DNS name, user,password is the username and password for an account that has access to the target forest or domain, and WebApp is the name of the Web application that supports your deployment of Team Foundation Server:

    stsadm.exe -o setproperty -pn peoplepicker-searchadforests -pv domain:DnsName**,user,**password **-url http://**WebApp

    For more information about this stsadm.exe syntax, see the following topic on the Microsoft Web site: Select users from multiple forest domains. For an alternative approach to migrating users across domains with the stsadm.exe command, see Migrateuser: stsadm operation.

  4. Type the following command, where URL is the URL for a site collection that supports a team project collection, Port is the port number that is assigned to that site collection, and UserName is the user name of the account that will act as the owner for that site collection:

    **stsadm.exe -o siteowner -url http://URL:**Port -ownerlogin UserName

  5. Repeat the previous step for each site collection that your deployment of Team Foundation Server uses.

Move User and Service Accounts

To move user accounts and service accounts

  1. On the application-tier server for Team Foundation, open a Command Prompt window, and connect to %ProgramFiles%\Microsoft Visual Studio 2010 Team Foundation Server\Tools.

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

    **TFSConfig identities /change /fromdomain:**OldComputerorDomainName **/todomain:**NewDomainName **/account:**OldTFSServiceAccount **/toaccount:**NewTFSServiceAccount

    If your new environment contains one or more identities for which the names match those in the previous environment, migrate all of these accounts by using the Identities command with the /change parameter. For more information, see Identities Command.

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

    **TFSConfig Accounts /change /AccountType:ApplicationTier /account:**AccountName **/password:**Password

    For more information, see Accounts Command.

  4. If your deployment uses reporting, at the command prompt, type the following command:

    **TFSConfig Accounts /change /AccountType:ReportingDataSource /account:**AccountName **/password:**Password

  5. If your deployment uses Team Foundation Server Proxy, at the command prompt, type the following command:

    **TFSConfig Accounts /change /AccountType:Proxy /account:**AccountName **/password:**Password

    Note

    If you are moving to a non-trusted domain, you might also need to manually add users and groups to projects, collections, and Team Foundation Server itself. For more information, see Add Users to Team Projects, Set Administrator Permissions for Team Project Collections, and Set Administrator Permissions for Team Foundation Server.

  6. If your deployment is integrated with Project Server, you might need to perform additional steps to configure the service accounts with the permissions required for operation. For more information, see Assigning Permissions to Support Integration of Project Server and Team Foundation Server and Configuring the Integration of Team Foundation Server and Project Server.

Configure Reporting and Analysis Services

You can skip this procedure if you are not using reporting as part of your deployment. If you renamed a report server as part of this type of move, you must redirect Team Foundation Server to the report server at its new location. You must also restart the warehouse and manually rebuild the database for Analysis Services.

Note

If an error appears stating that that the account cannot be added to the TFSEXECROLE or TfsWarehouseDataReader role, the account is not valid in the new environment. You must remove the old account by using the TFSSecurity command-line tool with the /g- command, and update it with an account that is valid in the new environment. For more information, see Changing Groups and Permissions with TFSSecurity and /g- Command.

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 new name of the 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 new name of the server that hosts the Analysis Services database.

  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.

Restart Services That Team Foundation Server Uses

To restart 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 unquiesce

    For more information, see TFSServiceControl Command.

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.

After you move your deployment, you must register the instance of Project Web Access or Project Web App (PWA) that supports an enterprise project plan with the application-tier server for your moved deployment.

To integrate the moved deployment with Project Server

  1. Register an instance of PWA with the moved deployment of Team Foundation Server by using the TFSAdmin ProjectServer /RegisterPWA command with the /tfs, /force, and /pwa options.

  2. Wait for the data to synchronize.

    This process happens automatically on a predetermined schedule. For more information, see Overview of the Synchronization Process for Team Foundation Server and Project Server Integration, Changing the Configuration of Your Deployment, Registering an Instance of PWA to Team Foundation Server, and Removing a Component from Participating in Data Synchronization.

See Also

Tasks

Move Team Foundation Server from One Hardware Configuration to Another

Concepts

Team Foundation Server Move Types

Team Foundation Server Architecture

Change History

Date

History

Reason

May 2011

Provided additional guidance about using the Identities command.

Customer feedback.

March 2011

Added information about deployments that integrate with Project Server.

SP1 feature change.