Search code examples
azuretfstfsbuilddatabase-migration

Migrating TFS to new Server


I am currently working to move TFS from its' current server to a new environment. My team has already completed the steps as seen in this Microsoft Documentation on moving TFS to a new Server.

We have already installed and migrated/restored our SQL Database in the new server and ensured all the prerequisites for TFS were installed. The TFS Admin Console is currently installed and we are trying to configure it by using the existing Tfs_Configure database. That all works without a problem, however, when we go to look at our existing Project Collections, the build service is still "linked", having the TFS Address set to the old server and not the one we migrated to.

I have detached the collections in the old environment and reattached them in the new environment, however, they still seem to be trying to build in the old server. I am reading that we needed to detach them prior to migrating any data over. Did we do something incorrectly, or rather, did we try to detach the collections too late into the process?


Solution

  • You need to unregister the build service that uses the <<oldcomputername>>. Register a build service with the <<newcomputername>>. And do the same for the agent and the controller.

    enter image description here

    1. On each build server, open the administration console and stop the build service.
    2. In the properties for the build service, update the communications properties.

    enter image description here

    According to the above screenshot, you could see the build service is configured under project collection level.


    Moreover, for vNext build agent you need to remove and re-configure an agent.

    To remove the agent:

    .\config remove
    

    After you've removed the agent, you can configure it again.