April 27
TFS2005 to TFS2008 Migration Experiences
We have a Dual Server installation of Team Foundation Server 2005. The goal is to migrate it to a single server installation of 2008 while keeping the original TFS2005 working an untouched. The Database server is used also by other applications like MOSS.
I tried the following test scenarios in order to complete the migration:
- Use the TfsToTfsMigrationTool but this tool doesn't fits our need. some historical data is lost, it's low and so on.
- Restoring a backup of TFS2005 DB to an existing installation of TFS2008. I've tried to restore it as a named instance the running "TfsDb.exe upgrade" command to upgrade the database and then reattach the Application tier to this new DB. I've discovered that the upgrade doesn't work on SQL Server named instance.
- Then I've tried to restore the database as a default instance on a clean server (no TFS) and run TFS20087 install hoping that it will recognize the old DB and will install as an upgrade. It didn't worked. It offered me to install as a standby machine but when the installation recognized that the DB is an older version then the setup failed.
- Then I've tried to Install TFS2008 to a named instance and restore the DB as a default instance. DB Upgrade worked well but I didn't succeed to fully complete moving the Application tier to the new DB (default instance)
- Then I found in a forum that the scenario from step 3 may work if I first update a field in the DB. In the TfsIntegration database open the tbl_registration_extended_attributes table and update value field of the row with the "ATMachineName" as name to the name of Application tier machine. (In Single server scenario the is the same the DB server name). Indeed the TFS2008 setup offered the Upgrade path.
- Additional steps still needs to be taken to restore both the connection to a Sharepoint and reporting service. All fields in the database pointing the old TFS and database servers has to be changed. This can be done in 2 different way:
- Updating the database directly - Locate the server names in all tables of TfsIntegration database and change is to the current server name.
- Using some tools that will update the database
- Export the current configuration of the old TFS2005 by calling the GetRegistrationEntries of WebService http://tfs:8080/Services\v1.0\Registration.asmx .I used .Net WebService Studio tool.
- Save the result from the GetRegistrationEntries function call to an XML file for example RegistrationEntries.xml. Cut the text of the result that is between then node <GetRegistrationEntriesResult> ... </GetRegistrationEntriesResult> (not including the node name itself)
- Edit the RegistrationEntries.xml and add the <RegistrationEntries> root node
The XML file should look something like this:
<?xml version="1.0" encoding="utf-8"?>
<RegistrationEntries>
<RegistrationEntry>
...
</RegistrationEntry>
<RegistrationEntry>
...
</RegistrationEntry>
</RegistrationEntries> - The text of all <SQLServerName> node entries should be set the new SQL DB server name. In my case this was a single server installation so I changed to the name of the new TFS server. Set also the following nodes:
<RegistrationExtendedAttribute>
<Name>ATNetBIOSName</Name>
<Value>TFSSERVERNAME</Value>
</RegistrationExtendedAttribute> <RegistrationExtendedAttribute>
<Name>TeamBuild Server</Name>
<Value>TFSSERVERNAME</Value>
</RegistrationExtendedAttribute>
<RegistrationExtendedAttribute>
<Name>ATMachineName</Name>
<Value>TFSSERVERNAME</Value>
</RegistrationExtendedAttribute>
Search for all <ServiceInterface> nodes that has the URL of the old server and change it to the new one.
<ServiceInterface>
<Name>BaseReportsUrl</Name>
<Url>http://TFSSERVERNAME:80/Reports</Url>
</ServiceInterface>
- Use the TFSReg.exe tool to save back the XML to the new database that was restored to the new server. Be careful to specify the new database and not the old one destroying the original TFS installation that we want to keep intact for any case.
- All prerequisites of TFS2008 needs to be installed including SharePoint WSS3.0. The Sharepoint project sites wont' be migrated/upgraded. I used Tzunami Deployer from www.tzunami.com to migrate the content of the old WSS2.0 to the new WSS3.0
- Finally start the installation of TFS 2008. During the setup you may get error related to the SQL report service and the installation will hold waiting to cancel or retry. This is because the the Reporting Services Encryption Key has to be restored from the old TFS server. See How to: Back Up the Reporting Services Encryption Key
The reporting service encryption key has to be restored using for example the Reporting Service Configuration Manager and then In the TFS 2008 Setup press retry to continue the installation.