Moving Team Foundation Server from single virtual server to dual server on a new domain
I was recently forced to do a migration from a single virtual server to a dual server deployment on a new domain with a couple of running projects on it. Now you might argue things like this should be thorougly thinked through first, which we did, but then our virtual environment ran into a couple significant issues. So I was forced to do this migration quickly to limit the downtime for the projects that were using the platform.
In this blog post I will share the lessons learned as it appeared the Microsoft migration guides, though useful, didn't support my complete scenario.
The Microsoft guides for migration of TFS environments seem great at first glance as there are a couple of scenarios available. Unfortunately our scenario is not there. Here's a list with links to a couple of guides required in a typical TFS migration scenario:
The order in which I have done the migration is as in the previous list, although the following guides aren't written for my scenario, so I needed to mix the following guides:
So in the remainder of this blogpost I will go through the order on how to mix the latter guides. Since the Microsoft material is copyrighted I think I am better off not copy/pasting a new guide.
Both guides start with references to the backup guides mentioned in my first list, I chose to use the How to: Move Your Team Foundation Server from One Hardware Configuration to Another to start with as the first things you will have to do is the topic in that guide called "To install and prepare the new TFS server for a restore-based move". This involves backing up the Reporting Services installtion id's. You can skip steps 5-10 in that guide for this topic. Then it is time to the full data restore in the other guide (How to: Restore Team Foundation Server Data to a Different Server), without restoring the Sharepoint configuration database (STS_CONFIG_TFS). You can skip the topic "To re-configure and stop the report server" and the "To stop remaining services used by Team Foundation Server" as these are already done in the previous guide. The rest of the guide is fine, but you work through it till the "Reporting Connections for Reporting Services" topic. You can skip the rest of the guide and return to the previous guide (How to: Move Your Team Foundation Server from One Hardware Configuration to Another).
In that guide you are walking through the reconfiguration of the new application and data tier with a commandline tool (tfsadminutil). There's a typo in the guide that says (in step 1a) "On the new Team Foundation data-tier server, open a Command Prompt window and change directories to drive:\%ProgramFiles%\Microsoft Visual Studio 2005 Team Foundation Server\Web Services\Services." to change the web.config to point to the old data tier, this should of course be done on the application tier. The guide is lacking the step to revert the web.config file to have the connection string point to the new datatier. So I have written these steps. You can do these steps right before the topic called "To move user accounts and service accounts":
To Restore the web.config
Modify the services web.config file and replace the Team Foundation data-tier name with the NEW Team Foundation data-tier name as follows:
-
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.
-
Open the web.config file in this directory in Notepad or any text-based editor.
-
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=oldTeamFoundationDataTierServerName;Initial Catalog=TfsIntegration;Integrated Security=True;Persist Security Info=False
to
Application Name=TeamFoundation;Data Source=newTeamFoundationDataTierServerName;Initial Catalog=TfsIntegration;Integrated Security=True;Persist Security Info=False
- Save the Web.config file and close Notepad.
In the topic called "To restore WSS project sites on the new team foundation application-tier server" you will setup the new WSS Configuration database to use the WSS Content database that you restored already in the "How to: Restore Team Foundation Server Data to a Different Server" guide.
After this I was all set. I still think Microsoft did great work in the possibility to move around TFS, even to different domains. In particular the tool to reconfigure the system is great (tfsadminutil).