Rules to Better TFS 2012 Migration - 5 Rules
Update: TFS 2012 has been replaced by TFS 2015 - if you're moving to TFS 2015, see our Rules to Better TFS 2015 Migration.
In this page we will look at upgrading an existing TFS 2010 server to a new TFS 2012 server. In this walkthrough, we assume you are currently using a single server configuration, but might want to separate your SQL Server from your TFS server. We also assume you have a DNS entry setup for external access at tfs.northwind.com.
Upgrading Team Foundation Server can be a daunting task. Be assured that things have become easier and if you follow this guide, it will minimize your downtime.
If you still need help, visit Application Lifecycle Management and book in a consultant.
Prepare a new image. We recommend running Windows 2008 R2 Server x64using Hyper-V Manager. Your options are:
- Manually build a server
- Use a syspreped image (this will be quicker)
- System Center Virtual Machine Manager (recommended, quickest)
Add the roles
- Application Server
Install SQL Server 2012 components for reporting and analysis (on the TFS server)
- Install (but don't configure) SQL Server 2012 Reporting Services
- Install (but don't configure) SQL Server 2012 Analysis Services
You'll also need a SQL Server instance for the TFS databases if you don't already have one
- Install SQL Server 2012 x64 default configuration
We recommend doing a move to a new environment because it has a much easier rollback path if something goes wrong.
Note that these steps will also work for upgrading from TFS 2012 RC to RTM, or RTM to Update 1.
These are the steps to migrate and upgrade to a new environment:
- Send an email to let everyone know the TFS server will be offline.
- Take the TFS 2010 server offline
- Copy the TFS 2010 database backups to the TFS server or the new SQL Server instance. Make sure the URL is accessible from the TFS server via a network share.
- Install Team Foundation Server 2012 or TFS 2012 Update 1 (see Damian Brady's experiences).
- Make sure you have access to coffee while it's installing - it could take a while!
- After the install has completed, the Team Foundation Server Configuration Center will start
- Select Upgrade | Start Wizard
- Launch the Database Restore tool by clicking on the link
- If necessary, change the Target SQL Server Instance and click Connect
- In the Restore Database screen, Browse, then navigate to the folder with your database backups. Make sure all of them are ticked, then click Restore.
- Click Close, then click Next in the Upgrade Wizard
- Choose the configuration database by specifying the SQL Server Instance and clicking List Available Databases
- Check "By checking this box, I confirm that I have a current backup.", then click Next
- Leave Network Service as the service account for the Application Tier, then click Next
- Check the checkbox to confirm we want to configure Reporting Services, then click Next
- Make sure the Reporting Services instance and URLs are correct, then click Next
- Update the SQL Server Instance for our Warehouse Database, and click Test to test the connection
- Click List Available Databases and check the Tfs_Warehouse database is shown, then click Next
- Click Next on the Analysis Services page
- Provide details of the TFSService account your reports will run as then click Next
- Check the checkbox to say we want to configure SharePoint, then click Next
- Choose "Use current SharePoint settings", then click Next
- Confirm the details on the Summary page and click Verify Note: At this point, you may be asked to reboot and start the wizard again. Don't despair - it's quicker the second time!
- Once you have all green ticks, click Configure
- Have a coffee
- Click Next
- Click Close, then Close again.
- Change the DNS entries for your TFS server to point to the new TFS 2012 server Note: It's a good idea to get the SysAdmins involved at this stage
Before starting your upgrade, you should back up all your TFS databases.
It's important that you backup TFS by using one of the supported methods, to ensure that you can reliably restore your data if needed.
Tip: The Team Foundation Server Team Foundation Server 2012 Update 2 and above has a built in Scheduled Backup tool which helps you to easily backup all TFS Databases. For versions prior to TFS 2012 Update 2 you have to use Backups tool from the TFS Power Tools package.
In some cases you won't be able to use this tool e.g. with TFS 2012 Power Tools RTM. This version has a bug which causes a failure of Tfs_Configuration DB when you try to restore it.
In such case you will have to manually backup databases. Make sure all relevant databases have been backed up. This includes all those starting with "Tfs_"
Important: Manual backup requires additional user steps which involve creation of additional tables and stored procedures. These tables has to be created to keep TFS databases in sync.
Follow this instructions to properly backup your databases: Manually back up Team Foundation Server.
If you manually backup the TFS Databases make sure you add additional jobs that execute 1 minute before the backup kick off.
Make sure you back up the Reporting Services database if you'd like your reports to come across as well.
For Reporting Services make sure you have backed up the encryption key.
More steps will be required to integrate your SharePoint site and set up your Build servers.
After a TFS upgrade, you'll need to make sure your other servers are still integrated properly.
- Check your Build servers. You'll need to upgrade the TFS installation on them and make sure they're set up correctly.
- Check your SharePoint servers. You'll need to install the latest SharePoint Extensions and make sure you repair your SharePoint connections in the Configuration Manager of your TFS Server
If you’re upgrading TFS 2010 to 2012, it’s highly recommended that you assign sysadmin privileges to the user account that’s doing the upgrade.
Some database upgrade steps involve ALTER DATABASE statements and other commands that can’t be done by a normal user. If a step fails, you are likely to end up with a corrupted Configuration database (so you have to restore from backup).