Geeks With Blogs
Gaurav Bodar - ALM Consultant, TFS specialist ALM, TFS, Agile, Scrum, Sharepoint, IT Service

Starting with TFS 2010 there is new capabilities of Collection available. Big organization can have several businesses and each one can host their own TFS and then they might decide to centralize the TFS environment. 

We can achieve this by three step migration
TFS ( Version Control, work item, Build )
SharePoint (Team site)

TFS Migration steps 

1.      Launch Application Tier of source TFS server and Launch TFS admin GUI Select the collection and detach it

2.      Go to Data tier and launch SQL mgmt. studio.  Take backup of TFS Collection SQL database.

3.      Go to Data tier of Destination TFS  and START | RUN | Connect to backup drive of Destination TFS Server Data tier

4.      Copy database backup to local drive and restore it to SQL server using SQL mgmt. studio

5.      Go to App tier of Destination TFS Server and launch TFS admin Console. Attach collection 

Detailed Steps available at


SharePoint Migration steps 
I use SharePoint site backup option for collection level migration as WSS_Content will have detail about all site collections mapped to many team project collections.

To backup SharePoint site (Read my future blog for automating backup procedure)


  1. Launch the SharePoint central administer page on source Server and create New Content database using Manage Content database Tab in application management
  2. Create site collection and change primary collection administrator to TFS support account
  3. Launch SharePoint management shell and restore database backup to newly created Content database

Restore-SPSite -Identity <servername> -Path D:\sharepointsitebackup.bak -DatabaseServer <server name> -DatabaseName <wss_singlesite> -Force

  1. Now Launch Destination TFS server Data tier. Attach the Newly Created Content Database using SQL Server management studio
  2. Now On target Sharepoint server launch the SharePoint management shell
  3. Add the conent database into this sharepoint environment using

Mount-SPContentDatabase <WSS_Singlesite> –WebApplication <webapp url>  more information

  1. If you are using SharePoint 2013 on target SharePoint and if your source SharePoint server was 2007 or 2010 please don’t forget
    Convert-SPWebApplication -Identity <web application url> -To Claims –RetainPermissions


Posted on Wednesday, August 21, 2013 11:43 AM TFS , sharepoint , migration | Back to top

Comments on this post: How to migrate tfs collection from exiting server to another tfs server:

# re: How to migrate tfs collection from exiting server to another tfs server:
Requesting Gravatar...
Hi. When I try to detach, job gets queue and it never happens. Any idea why?
Left by Moe on Jan 29, 2015 9:45 AM

# re: How to migrate tfs collection from exiting server to another tfs server:
Requesting Gravatar...
This is something very interesting to learn now. - Mark Zokle
Left by George David on Nov 02, 2016 12:27 AM

comments powered by Disqus

Copyright © Gaurav Bodar | Powered by: