Move a Team Project Collection

Visual Studio Team Foundation Server 2012

You can move a database for a team project collection from one server that is running SQL Server to another. You can also move a team project collection from one deployment of Team Foundation Server (TFS) to another, although you must first detach it from its original collection and then back up its database before the move. 

NoteNote

When you move a collection, ideally the version and edition of SQL Server to which you are moving the database matches the version and edition that originally hosted that database. For example, if the collection database is hosted on a server that is running SQL Server Enterprise Edition, you should move it to a server that is also running SQL Server Enterprise Edition. You should not move it to a server that is running SQL Server Standard Edition or SQL Server Express. If you must change editions, you might need to disable data compression for the databases that you want to move before you back them up and restore them. For more information, see the Microsoft Knowledge Base article.

You might want to move a team project collection in the following circumstances:

  • You want to expand your deployment of TFS by adding another instance of SQL Server to it, and you want to distribute existing collections between the instances.

  • You have more than one deployment of TFS in your organization, and you want to move a collection to another deployment to better align with your business needs.

  • You want to move the collection to a remote office that has its own deployment of TFS.

  • You want to incrementally upgrade your deployment by detaching an individual team project collection from a deployment of TFS running an earlier version, and then move it to a server running the current version of TFS. (In this scenario, you must also then upgrade each team project within the collection by using the Configure Features wizard. For more information, see Configure features after a TFS upgrade.

Important noteImportant

If you are moving a team project collection to a different deployment of TFS, you must detach the collection before backing up its database. Otherwise, you will not be able to attach the collection to that deployment, even though you have restored its database to the instance of SQL Server that supports that deployment.

The steps that you must perform to move a collection will depend on the particular configuration of the deployment that hosted the collection and the deployment to which you move it. For example, if you move a collection to a deployment of TFS that uses a different SharePoint Web application, either you will also need to move the site collection database that supports the collection to that SharePoint Web application and manually reconnect the team project collection to the site collection after it has been moved, or you must add the SharePoint Web application that supports the collection to the deployment of TFS to which you have moved it. Similarly, if you move a collection to a new domain, you will need to add users from that domain to the appropriate groups at the collection level and the project level.

NoteNote

The procedures in this topic describe how to move an entire team project collection. If you want to move part of a collection, see Split a Team Project Collection.

In this topic

To move a team project collection, you must complete the following procedures in the sequence listed:

  1. Required Permissions

  2. Save Reports

  3. Delete Lab Management Resources

  4. Unmap the Collection from Microsoft Project Server

  5. Detach the Collection

  6. Back Up the Collection Database

  7. Rebuild the Data Warehouse and Analysis Services

  8. Prepare to Move the Site Collection Database

  9. Move the Site Collection Database

  10. Restore the Collection Database

  11. Attach the Collection

  12. Move Reports

  13. Reconnect Resources for the SharePoint Web Application

  14. Configure the Moved Team Project Collection

  15. Configure Lab Management Resources

  16. Configure Project Server Integration

  17. Configure Projects

Required Permissions

To perform the following procedures, you must be a member of the following groups:

  • a member of the Administrators security group on the server or servers that are running the administration console for Team Foundation

  • a member of the sysadmin group in SQL Server on the servers and instances that host databases for TFS

  • a member of the Farm Administrators group for the farm to which you are configuring a Web application and changing settings for the collection, if your deployment uses SharePoint Products.

If you are moving the collection between deployments that use SharePoint Products, it is strongly recommended that the service account for TFS be a member of the Farm Administrators group in SharePoint Products in both deployments. Otherwise, you might experience errors when you attempt to detach or attach the collection.

NoteNote

You can move a team project collection without granting this membership to the service account for TFS. However, errors will appear when you attach the collection, and you will need to perform additional steps to reconnect projects with their portals. Even if your operational requirements generally restrict granting this membership to the service account, you should consider adding the service account to the Farm Administrators group for the duration of the move operation.

Save Reports

You can skip this procedure if you are not using a server that is running Reporting Services as part of your deployment, or if the deployment to which you are moving the collection does not use a report server.

If the deployment from which you are moving the collection uses a report server, you must save the reports used by the collection so that you can upload them to the report server that supports the deployment to which you are moving the collection.

To save reports

  • For information about this task, see the "Exporting and Saving Reports" section in the following topic on the Microsoft Web site:

Saving Reports.

Delete Lab Management Resources

You can skip this procedure if either of the following conditions is true:

  • The team project collection that you are moving is not currently configured for Visual Studio Lab Management. 

  • You are moving the team project collection within the same domain and intend to use the same System Center Virtual Machine Manager (SCVMM) that previously supported the collection.

If you are moving the collection to a different domain or intend to use a different System Center Virtual Machine Manager, you must delete the resources that are used by Lab Management from the collection database. These resources include virtual machines, templates, team project host groups, and team project library shares. You will need to re-create the Lab Management assets after you restore and attach the collection.

To delete the Lab Management resources

  • For information about how to remove all group hosts, library shares, and environments from a specified team project collection, see

TFSConfig Lab /Delete Command with the /External option.

Unmap the Collection From Microsoft Project Server

You can skip this procedure if your deployment of TFS is not integrated with Microsoft Project Server.

Before you move a collection, you must unmap any collections that will not continue to synchronize with the instance of Project Web Access or Project Web App (PWA) that supports the deployment of TFS. Each instance of PWA can integrate with only one deployment of TFS. Collections on different deployments of TFS cannot synchronize with the same instance of PWA.

For example, you must determine which of the following scenarios best supports your business needs if you have two collections on your deployment of TFS and they are both integrated with Project Server:

  • If you intend to move both collections and continue to use the same instance of PWA, you do not need to unmap the collections. However, you must re-register them after the move by following the steps in this section.

  • If you intend to move only one collection, you must first unmap one of the collections. Which collection you unmap depends on how you want to support Project Server integration with your TFS deployments.

    • You must unmap a collection if you do not intend to continue integration of it or if you are moving it to a deployment of TFS that is integrated with a different instance of PWA.

    • If you intend to continue integration with the same instance of PWA, you must unmap the other collection or collections that are integrated with that instance before you move the collection.

To unmap a collection

  • Use the TFSAdmin ProjectServer /UnmapPWAFromCollection command with the /force option.

    Important noteImportant

    If you use the /force option, you will unlink all work items from Project Server, which can have unintended consequences if this option is not required. For more information, see Map a Team Project Collection to an Instance of PWA and Change the Configuration of Your Deployment.

Detach the Collection

Before you move a collection, you must first detach it from the deployment of TFS on which it is running. When you detach a collection, all jobs and services are stopped, and then the collection database is stopped. In addition, the detach process copies over the collection-specific data from the configuration database and saves it as part of the team project collection database. This configuration data is what allows the collection database to be attached to a different deployment of TFS. If that data is not present, you cannot attach the collection to any deployment of TFS except the one from which it originated.

NoteNote

Detaching a collection prevents users from accessing any projects in that collection but does not delete any data. To delete the data for the collection, you must delete the collection.

To detach a team project collection

  1. Open the administration console for Team Foundation on the server that hosts the collection that you want to move.

    For more information, see

Open the Team Foundation Administration Console.
  • Choose Team Project Collections, and in the list of collections, choose the collection that you want to move.

  • On the General tab, choose Detach Collection.

    The Detach Team Project Collection Wizard opens.

  • (Optional) On the Provide a servicing message for the team project collection page, in Servicing Message, provide a message for users who might try to connect to projects in this collection.

  • Choose Next.

  • On the Review settings that will be used to detach team project collection page, review the details.

  • If you want to changes any settings, choose Previous. If they appear to be correct, choose Verify.

  • When all the readiness checks have completed successfully, choose Detach.

  • On the Monitor the team project collection detach progress page, when all processes have completed, choose Next.

  • (Optional) On the Review supplemental information for this team project collection page, either choose or note the location of the log file.

  • Choose Close.

    The team project collection no longer appears in the list of collections in the administration console.

  • Back Up the Collection Database

    After you have detached the collection, you must back up its database to move it to the other server. To perform this task, you must use the tools that are provided with SQL Server.

    Important noteImportant

    If your original deployment used the Enterprise or Datacenter editions of SQL Server, and you want to move the database to a server running Standard edition, you must use a backup set that was made with SQL Server compression disabled. Unless you disable data compression, you will not be able to successfully restore Enterprise or Datacenter edition databases to a server running Standard edition. To turn off compression, follow the steps in the

    Microsoft Knowledge Base article.

    To back up a collection database

    • For information about this task, see the following page on the Microsoft Web site, and make sure to choose the version of SQL Server that matches your deployment: Backing Up and Restoring Databases in SQL Server and Create Back Up Schedule and Plan.

      Important noteImportant

      If your original deployment used the Enterprise or Datacenter editions of SQL Server, and you want to restore databases to a server running Standard edition, you must use a backup set that was made with SQL Server compression disabled. Unless you disable data compression, you will not be able to successfully restore Enterprise or Datacenter edition databases to a server running Standard edition. To turn off compression, follow the steps in the Microsoft Knowledge Base article.

    Rebuild the Data Warehouse and Analysis Services

    You can skip this procedure if you do not have reporting configured as part of your deployment.

    If the deployment from which you are moving the collection uses a report server, you must rebuild the warehouse for Team Foundation and the database for Analysis Services. You must perform this step on the server from which you removed the collection to ensure that reports and dashboards work correctly for the deployment after you remove the collection.

    To rebuild the data warehouse and the Analysis Services database

    1. Open the administration console for Team Foundation.

    2. In the navigation bar, choose Reporting.

    3. In Reporting, choose Start Rebuild.

    4. In the Rebuild the Warehouse and Analysis Services Databases dialog box, choose OK.

      NoteNote

      The warehouses will finish rebuilding and the data will finish repopulating after the Start Rebuild action completes. Depending on the size of your deployment and the amount of data, the entire process might take several hours to complete.

    Prepare to Move the Site Collection Database

    You can skip this procedure if any condition in the following list is true:

    • You are moving the collection to a deployment of TFS that utilizes the same SharePoint Products resources as the original deployment.

    • You plan to add the SharePoint Web application that supports the collection to the deployment of TFS to which you are moving the collection.

    • The collection you are moving does not use SharePoint Products.

    To move a team project collection that uses a SharePoint Web application, you must move the site collection that supports the team project collection to the Web application that will support the collection in the deployment to which you are going to move it.

    To prepare to move the site collection database

    • For information about this task, choose one of the following links to the Microsoft Web site:

      For SharePoint Foundation 2010:

      • To move a site collection within the same domain, see

    Back up a site collection and Restore a site collection.
  • To move a site collection to a different domain, see Restore a site collection and Move a SharePoint site from one domain to another.

  • For Microsoft Office SharePoint Server 2007:

    Move the Site Collection Database

    You can skip this procedure if you did not perform the steps to prepare to move the site collection database, as described earlier in this topic.

    If you backed up the site collection database for the team project collection that you are moving, you must restore it to the SharePoint Web application that supports the deployment of TFS to which you are moving the collection.

    To move the site collection database

    • Click one of the following links for the appropriate topic on the Microsoft Web site.

      For SharePoint Foundation 2010:

      • To move a site collection to a different content database, see

    Move site collections between databases and Restore a site collection.

    For Microsoft Office SharePoint Server 2007:

    Move the Team Project Collection Database

    As part of moving the collection, you must restore, copy, or otherwise move the collection database to an instance of SQL Server that is configured to support the deployment of TFS to which you want to move the collection. You can choose what method you prefer to move the database.

    To move the team project collection database

    • For more information about moving a database to another instance of SQL Server, see:

    Use the Copy Database Wizard
  • Copy Databases with Backup and Restore

  • Attach the Collection

    After you restore the collection database, you can attach the collection to the deployment of TFS to which you want to move it.

    NoteNote

    Warnings will appear when you attach the collection if your deployment uses SharePoint Products and the service account for TFS is not a member of the Farm Administrators group. This behavior is expected.

    To attach the collection

    1. Open the administration console for Team Foundation on the server that hosts the application tier for the deployment to which you want to move the collection.

    2. Choose Team Project Collections, and then choose Attach Collection.

      The Attach Team Project Collection Wizard opens.

    3. On the Select the team project collection database to attach page, in SQL Server Instance, provide the name of the server and the instance that hosts the collection database, if it is not already listed.

    4. In the Databases list, choose the collection database that you want to attach, and then choose Next.

    5. On the Enter the team project collection information page, provide a name for the collection in Name if one is not already present.

    6. (Optional) In Description, provide a description of the collection.

    7. Choose Next.

    8. On the Review settings that will be used to attach the team project collection page, review the information.

    9. If you must change any settings, choose Previous. If all the settings are correct, choose Verify.

    10. When all the readiness checks have completed successfully, choose Attach.

    11. On the Monitor the team project collection attach progress page, when all processes have completed, choose Next.

    12. (Optional) On the Review supplemental information for this team project collection page, choose or note the location of the log file.

    13. Choose Close.

      The team project collection appears in the list of collections in the administration console. The SharePoint Web application that supported this collection in its original deployment will appear in the list of Web applications.

    14. (Optional) Modify or remove the Web application from the list of Web applications. For more information, see

    Modify or Remove Access Between a SharePoint Web Application and Team Foundation Server.

    Move Reports

    You can skip this procedure if you are not using a report server as part of your deployment or if the deployment of TFS to which you are moving the collection uses the same report server.

    You must move the reports that this collection uses to the report server for the deployment of TFS to which you have moved the collection. You must upload each report manually, which can be a lengthy process. Consider whether you want to upload all reports or whether a subset of reports will meet your business needs. You do not have to upload all reports or any reports, but only those reports that you upload will be available after the move process is completed.

    To move reports

    1. Upload each report that you want to move to the appropriate folder in Report Manager.

      For more information, see the following topic on the Microsoft Web site:

    Uploading Files to a Folder.
  • In Report Manager, edit each report to change the data source to the new report server.

    For more information, see the following topic on the Microsoft Web site: How to: Configure Data Source Properties for a Report.

  • After you have uploaded and edited each report, reconnect the SharePoint Web application that supports the portals for the team projects that use the reports.

    For more information, see the next procedure.

  • Reconnect Resources for the SharePoint Web Application

    If you are moving the collection to a deployment of TFS that does not use SharePoint Products or a report server, skip the following procedure.

    You must repair the connection to the SharePoint Web application even if you move the collection to a deployment of TFS that uses the same SharePoint Web application as the deployment of TFS from which you moved the collection. You must perform this procedure to ensure that all connections are correctly set between the restored collection and the Web application.

    To repair the connection to a SharePoint Web application

    1. Open the administration console for Team Foundation on the server that hosts the application tier for the deployment to which you want to move the collection.

    2. Choose SharePoint Web Applications, and in the list of Web applications, choose the Web application that will support the collection that you just attached.

      The Repair Connection button appears after you select a Web application in the list.

    3. Choose Repair Connection, and in the Repair the connection to a SharePoint Web Application dialog box, choose Repair.

    4. When the Status window reports Reconnect operation succeeded, choose Close.

    Configure the Moved Team Project Collection

    You can skip this procedure if you moved the collection in the same domain, intend to use the same Web application that previously supported the collection, and you want to allow access for the administrators of that collection to this deployment of TFS.

    After you have moved a collection, you must update the Web application and permission groups for that collection with the appropriate settings.

    To configure the moved collection

    • For information about this task, see

    Modify a Team Project Collection and Set Administrator Permissions for Team Project Collections.

    Configure Lab Management Resources

    You can skip this procedure if you moved the team project collection in the same domain and intend to use the same System Center Virtual Machine Manager (SCVMM) that previously supported the collection.

    If you moved the collection to a different domain or intend to use a different System Center Virtual Machine Manager, you must recreate team project host groups and team project library shares in TFS and the virtual machines, templates, and environments in Microsoft Test Manager.

    To configure Lab Management resources

    1. Configure the application tier for Team Foundation.

      For more information, see

    Configuring Lab Management for SCVMM Environments.
  • Recreate the golden master virtual machines and templates in the new SCVMM and import virtual machines and templates into the team project collection.

    For more information, see How to: Create and Store Virtual Machines and Templates Ready for Lab Management.

  • Recreate the environments for each team project.

    For more information, see Creating an SCVMM Environment Using Stored Virtual Machines and Templates.

  • Configure Project Server Integration

    You can skip this procedure if the team project collection that you are moving is not integrated with Microsoft Project Server.

    If you moved a collection and intend to continue integration between it and Project Server, you must perform the following tasks:

    • Register the instance of Project Web Access or Project Web App (PWA) that supports an enterprise project plan with the application-tier server that hosts the moved team project collection.

    • Wait for the metadata to synchronize.

    • Unregister the application-tier server that formerly hosted the collection, if it does not host other collections that are integrated with Project Server.

    To integrate the moved collection with Project Server

    • To register an instance of PWA with the deployment of TFS that hosts the moved collection, use the TFSAdmin ProjectServer /RegisterPWA command with the /tfs, /force, and /pwa options. For more information, see Register an Instance of PWA to Team Foundation Server.

      After you have registered the instance, you must wait for the metadata to synchronize. This process happens automatically on a predetermined schedule. For more information, see Overview of the Synchronization Process for Team Foundation Server and Project Server Integration.

    • After synchronization is complete, remove the registered association between the previous instance of PWA, if any, and TFS by using the TFSAdmin ProjectServer /UnregisterPWA command with the /tfs and /pwa options. For more information, see Register an Instance of PWA to Team Foundation Server and Remove a Component from Participating in Data Synchronization.

    Configure Projects

    You can skip this procedure if you moved the collection in the same domain and you want to allow access for the users of projects in that collection to this deployment of TFS.

    After you configure administrators for the moved collection, either you or those administrators must add users and groups to the projects in that collection. Depending on your deployment, you might also need to configure permissions for those users in SharePoint Products and Reporting Services.

    To add users to team projects

    • For information about this task, see

    Add Users to Team Projects.

    To add resources to moved team projects

    See Also

    Tasks

    Connect Microsoft Excel or Microsoft Project to a team project

    Concepts

    Change the Configuration of Your Deployment
    Collaborate (dig deeper)
    Collaborate