How to: Archive Team Foundation Server Team Projects

Every so often, I get asked for help with the archiving of Team Projects. The team asking usually no longer wants to see their old Team Projects for whatever reason, but they still want to get it back should the need arise.

Although there currently is no archiving function on TFS, you can still archive these Team Projects. The process described below will work for TFS2010, TFS2012 (all updates) and TFS2013 (all updates). It will not work for Visual Studio Online (TFS Services). If you follow the steps below carefully, you will have a working archiving solution. Do not skip a single step and follow the steps in the correct order!

Since migrating Team Projects between Team Project Collections is a mammoth task, you will probably create a new archive the next time you want to archive some Team Projects in a Team Project Collection that you already have an archive for. Therefor it is important to document what is in each archive.

So here is how you do it:

  1. Stop TFS app in IIS – this is not strictly speaking required, but for safety’s sake…
  2. Stop the Team Project Collection database which hosts the Team Project you want to archive using Team Foundation Server Administration Console.
  3. Back up the Team Project Collection database which hosts the Team Project you want to archive using SQL Server Management Studio.
  4. Detach the Team Project Collection using Team Foundation Server Administration Console.
  5. Create a copy of the Team Project Collection using SQL Server Management Studio – add the word archive to the name of the copied Database.
  6. Attach both Team Project Collection using Team Foundation Server Administration Console, but keep them off-line.
  7. Start TFS app in IIS.
  8. Delete the Team Projects you want to archive from your current Team Project Collection.
  9. Delete the Team Projects you do not want to archive from the archive Team Project Collection.
  10. Bring your current Team Project Collections line.
  11. You can now detach the archive Team Project Collection again and back it up to external media using SQL Server Management Studio or you can bring it online, in which case you need to configure the security for the archive Team Project Collection – you do not want people to have any other than Read access to this Team Project Collection.

There shouldn’t be any problem with skipping step 1 and 7 – stopping and starting of the TFS app in IIS, by taking the Team Project Collection offline, you will also prevent transactions from being handled against the specific Team Project Collection. I just prefer to wear a belt AND suspenders…

When I have a back-up, I will not need it, but when I don’t have one I will need it!

Advertisements

About cathcor

I am a true geek. I am passionate about the processes and tools involved in software development. I was a code slave for nigh on 16 years and I understand what it is like to be in the trenches. Now I make it my mission to make the processes and tools assist developers to deliver working software in such a way as to grow them personally and professionally. A happy developer delivers better code. My professional motto is: "Make technology work for people!" I recently got married. Between my wonderful God fearing husband and I we have four adult children. I contributed three to the equation (smirk). Life has its challenges, but the rewards make every challenge and sacrifice worth it ten times over. :) View all posts by cathcor

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: