Situation: TFS was installed on a windows 7 pc, to replace the source safe 2005. People log in via the tfs web portal and visual studio users connect also to tfs.

Now a new server arrived and the TFS needs to be migrated to the new server.

What I did so far:

  1. installed TFS (advanced wizard) on the server
  2. installed tfs power tools on the server
  3. took a backup on the pc
  4. restored the backup on the server (via the TFS power tools)
  5. the server had the wrong site names, still from the pc. (like: http://pc:8080/tfs instead of http://server:8080/tfs)
  6. I managed to change the urls to the correct ones

I went to http://server:8080/tfs but didn't work.

When I stopped the TFS site on the pc in IIS and went to http://server:8080/tfs, that worked, I see the portal now but with error: TF31002.

Any idea how to fix error TF31002 or what should be done? (Sharepoint is also installed on that server)

Kind regards


There is a process for moving TFS: it isn't just about backup & restore of the database. It is documented on MSDN Moving Team Foundation Server.

You would be better to:

  • Create new TFS installation on the server. Do not create any project collections.
  • On the PC detach each project collection.
  • On the PC backup each of the now disconnected project collection databases.
  • On the server restore each project collection databases.
  • In TFS on the server attach to each project collection database.

(Note: this means the configuration database is not moved: I suspect this is your underlying problem.)

The detach and attach of the project collections is done with the Team Foundation Server Administration Console in the Team Project Collections node.

  • I wouldn't do this becaues it leaves the configuration database on a client PC, probably on an installation of SQLExpress, while the rest of the data presumably moves to the full SQL Server product on the server. Much better to just move all the data and use TFSConfig PrepSQL. – Tim Elhajj Feb 8 '12 at 19:43
  • @TimElhajj Once the project collections are detached from the PC then its configuration database (and whole installation) is empty and redundant. A project collection detach removes the project collection. – Richard Feb 8 '12 at 23:23
  • @Richard indeed the configuration database was my problem. I followed your steps and they worked fine. The only thing I had to do is set all the groups/rights again for the collections like Contributors etc.. Thanks! – juFo Feb 9 '12 at 8:43
  • @Richard good point! – Tim Elhajj Feb 9 '12 at 16:12

This is the topic you want on MSDN: http://msdn.microsoft.com/en-us/library/ms404869.aspx

You've got to do a few things on the new server to get TFS to work.

I assume you installed SQL Server on the new server? There is a TFS command line tool you have to run which sets up a SQL Server role and does some other things. You shouldn't have to worry about any of the stuff aobut reporting or SharePoint in that article I linked becuase you didn't have those on the previous client install of TFS. Once you get TFS up and running, you can ADD sharePoint, which is a different task, covered by a differnet procedure. My suggestion would be to get the installation running exactly as you had it on the client and then consider improving with SharePoint and reporting, both of which are non-trivial tasks, if you want to integrate with an existing collection/team project.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.