Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

We are looking to create a new Team Foundation Server Collection for the next version of our application development. The source from our current version will largely not apply, except for a few DLLs which should more or less remain unchanged. We wanted to make a new collection but were wondering if we would be able to clone the DLL projects from our existing collection to retain history.

Is this possible? We realize this could bring up some "Dual Maintenance" issues if there are any bugfixes needed for the DLLs, but we are not too concerned about that scenario.

So far, I have come up with a few resources. Some MSDN posts were pointing people towards Splitting a Team Project Collection. The issue there, however, is that you can only have one project in each collection. IT states:

A project cannot exist in more than one collection. Until you delete all duplicated projects between the split collections, you will not be able to start the renamed collection.

That is not really what we want. We would like to maintain both projects with history in each collection.

Otherwise, I saw the TFSConfig command. It contains a /clone option, but I am not quite sure of its usage (additional examples are also hard to come by) and it mentions that it is primarily used for splitting as well.

Are we looking to do something that isnt possible? Would we need to copy the source and add it as a new project in the new collection and refer to the old collection if we really need history? Thanks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
289 views
Welcome To Ask or Share your Answers For Others

1 Answer

As other commenters have suggested, you probably don't want to start a new Team Project Collection for this purpose.

The normal reasons against creating a new TPC are:

  1. Sharing code or work items between two Team Project Collections is very difficult. It's almost as if you're connecting to a new server.
  2. Unless your project is so big, that you might need to move the collection to it's own SQL server in the future, there's not a lot of value in a new TPC

However, if you did decide that you want to create a copy of an existing TPC on the same server, these are the general steps to follow:

  1. Open the TFS Admin Console, go to Team Project Collections
  2. Select your existing collection and choose 'Detach Collection'
  3. Wait for the detach to complete. This procedure copies the "shared" data out of the configuration database (like groups/identities) and stores it in the collection database.
  4. Once the detach is complete, backup the databse in SQL
  5. In the admin console, choose 'Attach collection' and choose the database that you just detached & backed up

These steps can then be performed on the same server (or another server, if you want to move it there)

  1. Restore the database backup, with a new database name
  2. In the TFS Admin Console, choose 'Attach collection' and choose the database that you just restored.
  3. TFS will look at the GUID of this database (stored as an extended property), it will see that it is the same as a currently running collection on the server, and automatically give it a new GUID.
  4. At this point, you should have two collections running.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...