Migrating a TFS project collection to another server

After attach collection and then:

Run the following command once for each collection, by replacing the <TPC> with the name of the collection databases (Replace XYZ with the server name that hosts the SQL instance.)

TFSConfig Recover /ConfigurationDB:XYZ;TFS_Configuration /CollectionDB:XYZ;<TPC>

I learned it. I share it.

Occasionally you may want to move your Team Foundation Server database to another server, because for example:

  • You want to upgrade the underlying hardware or software infrastructure.
  • You want to split the project collection between multiple servers.
  • You want a copy of your live data in your test environment.

The process is fairly simple:

  1. Ensure that the target server has the same or newer SQL Server version than the source environment. It is important, because you cannot restore a SQL backup which was created with a newer SQL Server.
  2. Ensure that you have exactly the same version of TFS in both environments. Not only service packs, but also minor hotfixes matter!
  3. In your source server:
    1. Click Stop Collection in the TFS Admin Console.
    2. Click Detach Collection in the TFS Admin Console.
    3. Start SQL Server Management Studio and create a full backup of the database of the project collection.
  4. Copy the…

View original post 306 từ nữa