This is one journey to upgrade TFS 2005 to TFS11
Key points if you are in a hurry
You only get one chance at the upgrade, on the initial install. You need to do this as two upgrades TFS2005 –> TFS2008/2010 –> TFS11.
Two Step Warning
TFS2005 to TFS 11 is not supported in the documentation. Upgrades from TFS 2008 and 2010 are supported. You need to migrate to TFS 2010 first, and then to TFS11.
If you do try to go in one hop, you will see the following TF400101: Database cannot be upgraded.
Make sure that your Temp location for SQL is twice as big as your largest database. There is a lot of heavy lifting done during the upgrade.
One of the longest steps is usually copying the data around. Portable USB 3 hard drives are very fast. If you can, move the data that way.
If you are using 2005, I strongly recommend migrating to a newer server. With any upgrade it is vital that you have a backup of the data.
You should have three machines, one with your existing TFS2005, a transient TFS2010 server, and the final target TFS11 server.
- Build the TFS2010 server, install and configure with out SharePoint
- Backup and Restore your TFS2005 databases to the TFS 2010 database instance
- Upgrade the TFS2005 to TFS2010
- Build the TFS11 server, install and configure ALL the prerequisites.
- SharePoint is optional. If you are using SharePoint, there will be a 10 GB RAM warning.
- Backup and Restore your TFS2010 databases to the TFS11 database instance
- Install TFS 11
- Configure TFS to be an upgrade
- Upgrade complete
Step Zero – Read the guide
or finish reading this post!
Step One – Server Build
Build the TFS2010 server (no SharePoint!), make sure it has at least double the drive space as your SQL databases. The upgrade is disk intensive.
Configure TFFS 2010.
Build the target TFS11 server, but don’t install TFS
Step Two – Backup and Move the databases
Take a backup of the TFS2005 databases
1: DECLARE @DBName VARCHAR(50) -- database name
2: DECLARE @path VARCHAR(256) -- path for backup files
3: DECLARE @fileName VARCHAR(256) -- filename for backup
4: DECLARE @fileDate VARCHAR(20) -- used for file name
6: SET @path = 'C:Backup'
8: SELECT @fileDate = CONVERT(VARCHAR(20),GETDATE(),112)
10: DECLARE db_cursor CURSOR FOR
11: SELECT name
12: FROM master.dbo.sysdatabases
13: WHERE name LIKE ('Tfs%')
15: OPEN db_cursor
16: FETCH NEXT FROM db_cursor INTO @DBName
18: WHILE @@FETCH_STATUS = 0
20: SET @fileName = @path + @DBName + '_' + @fileDate + '2013-08-28 13:36:15'.BAK'
21: BACKUP DATABASE @DBName TO DISK = @fileName
22: WITH NOFORMAT
23: , INIT
24: , NAME = @DBName
25: , SKIP
26: , NOREWIND
27: , NOUNLOAD
28: , STATS = 100')
30: FETCH NEXT FROM db_cursor INTO @DBName
33: CLOSE db_cursor
34: DEALLOCATE db_cursor
move these databases to the TFS 2010 server, and restore them
Step Three – Upgrade to TFS2010
On the TFS2010 server, open a command prompt as an administrator (right click, run as administrator).
navigate to c:Program FilesMicrosoft Team Foundation Server 2010Tools
TFSConfig import /sqlinstance:"<SQL Server Instance>" /CollectionName:"<the upgraded collection name>" /confirmed
Wait a while .. 216 steps later
You then need to take a backup of:
- tfs_configuration database
- tfs_Warehouse database
- Every Team project collection database that you have attached in the configuration
Well worth while running the TFS 2010 Dogfood stats at this point (http://blogs.msdn.com/b/granth/archive/2009/10/23/tfs2010-sql-queries-for-tfs-statistics.aspx)
Use the same script as above.
Copy them and restore them to the TFS 11 server.
Step Four – Install TFS11
from the media, run tfs_server
At the splash screen, accept the License and click continue
Accept the inevitable User Account Control
Watch the Install
Now – Don’t freak out that you haven’t done an upgrade. This is done in the configuration step. Since TFS2010 there is the two phase approach – Install and then Configure.
The upgrade happens in the configure step
OK – Install phase complete, click close. The error message is because i was not connected to the interweb when the install was running.
Step Four – Upgrade and Configure
The configure screen will be shown. If you have closed the screen for any reason, then you can get to it from the start menu.
Open the Team Foundation Administration Console
From there, click on the Application Tier, and then Configure Installed Features
Click on Configure and Start Wizard
Then Click Next
OK – after this point it is a fairly vanilla install of TFS, sort out your accounts first, make sure you have space on the hard drive and crack on.
I will not put in lots of screen shots, as it is not any different to a standard install, and you are smart enough to do all that stuff anyway.
It will prompt for an existing TFS_Warehouse, and if any TPC database is not there the upgrade will fail.
And you now have the completed upgrade in TFS11.