Restoring TFS 2012 to Sandbox

One of my clients recently asked for some help with getting their TFS server up to snuff.  After getting the software itself in line, I needed to restore a TFS installation in a sandbox environment to plan and test out some significant changes to their Work Item data.  It’s not exactly a smooth experience so lets hope this eases the day of some other poor soul.  As with all things – SSDs make this a bearable duration of time.

Step 1: Install, but don’t configure TFS 2012 Update 3

TFS server components have levels of installation doneness.  Since this is a sandbox, I’m not worried about scaling out and will just install a single server.  To do this I:

  • (15 min) Install Windows Server 2012 Standard on a VM
  • (60 min) Windows Updates… oh mighty Zeus the Updates
  • (10 min) Wipe sweat from brow and walk around office cursing while fuming over what appears to be update 9,123,758 not budging
  • (15 min) Lay down SQL Server 2012 even though production runs on 2008 R2.  Details can be found on Manually Install SQL Server for Team Foundation Server
  • (10 min) Install TFS 2012 with Update 3.  Don’t run the configuration wizard!!!
  • At this point you should have all the pieces of TFS, but nothing configured.  TFS Administration console looks something like this:



    Step 2: Restore TFS Databases

    You can use the Administration console to restore your backups if made from a scheduled TFS backup.  You could also use the tfsrestore.exe tool.  In my case, I had some SQL Service permissions problems and disk space limitations that required me to manually restore each of the databases.



    Step 3: Change Server IDs

    Since I’ll be connecting to these in a non-isolated environment and I don’t want tools getting confused I am going to be safe and change server IDs.  TFS uses Guids to identify Servers and Collections.  Visual Studio and other tools using the SDKs will get confused regarding local settings and caches so this is a safeguard against black magic.


    TfsConfig.exe ChangeServerID /sqlinstance:localhost /databasename:Tfs_Configuration

    Step 4: Fix Accounts

    My new server is not attached to any domain, let alone the one used for the production TFS.  With this in mind, I need to update some accounts embedded in TFS. 

    TFSConfig.exe accounts /resetowner /sqlinstance:WIN-4jsv8rkkbki /databasename:Tfs_Configuration
    TFSConfig.exe accounts /add /accounttype:applicationtier /account:tfsservice "/password:shhhhhh" /sqlinstance:localhost /databasename:Tfs_Configuration

    Step 5: Configure TFS Application Tier


    From the TFS Administration Console click Application Tier and then Configure Installed Features.  This will give you a number of types of configuration scenarios.  We want Application Tier only which well hook up to our now restored Tfs_Configuration database (and friends).


    Make sure you choose the SQL Server to which you restored your databases (localhost for me).  Once you get to the Application Tier settings page, this should show the service account we added in Step 4: Fix Accounts.



    Everything should come out green upon Verification and you can let it rip.  If not, invoke Google 


    Step 6: Update Remaining Settings

    There will still be a number of settings that refer to the old topology. 


    Change the Urls to your new server:


    In this sandbox I have no need of Reporting Services or SharePoint.  I just disabled both:

    image    image


    Step 7: Rest

    It’s certainly not straight forward, but it’s much better than in past versions. 


    At this point you should be able to connect to your newly restored TPC and TPs.  If you find that a previously connected Visual Studio pre-selects Team Projects that were also selected in production you likely skipped Step 3.  This could result in weird behavior for you in the future against production.

    Send me your TFS vNext Feedback for the MVP Summit

    I’m headed to the MVP Summit at the end of this month and I want to take feedback to the team. 

    The summit is a great opportunity for me to give feedback, but I’m certainly not the only one with ‘ideas’ (just check Twitter).  So I want to give everyone a voice and I’ll do what I can to get it to the teams.


    So go for it.  Submit and vote up feedback on this UserVoice forum


    Keep it clean people!

    Real World Webcast Series for TFS 2010

    I and a few coworkers are running a twice monthly web series starting February 10th.  This series will touch on the opportunities we’ve been involved in to ease real world situations.

    If you are working with Team Foundation Server 2010 and are interested in making your life a little easier I invite you to come listen to what I and others have to say.  We’ll do everything we can to keep the schedule tight to 1 hour, but we are always available offline.

    Automating Team Foundation Server with PowerShell Feb 10th, 12pm EST

    System administration can be slow and inconsistent when performed manually, or quick and easy when automated. Learn to use PowerShell with TFS to script away that wasted time.


    Continuous Deployment with Team Build and MSDeploy Feb 24th, 12pm EST

    Caffeine, pizza, and anxiety are regular tools for a production deployment. Watch and learn how Team Foundation Build 2010 and MSDeploy can turn the last hurdle of software development into a moment of Zen.


    Planning and Executing Manual Tests with Visual Studio Test Professional 2010 Mar 10th, 12pm EST

    Visual Studio Test Professional 2010 makes a real impact on software quality. It’s an integrated testing solution that delivers a complete plan-test-track workflow. It allows the user to quickly identify quality-related bugs and easily report them with rich, actionable information. In this session, we’ll review test planning and manual testing with Visual Studio Test Professional 2010.

    Event: Team Foundation Server 2010 Overview with SCRUM

    Our previous Columbus TFS Event had such a wonderful turnout and response that we’ve decided to go on the road to Kentucky in a few weeks.  I’m happy to have Dave Dotterer of Kizan as my partner in crime.  Dave is a great TFS resource and it’ll be awesome to have his insight for the audience.  The agenda is similar, but we found in Columbus that we ran out of time.  To solve this we will be starting sharp at 8:15am on September 23rd and 24th.

    A big thanks to Danilo Casino of Microsoft for putting this together and inviting both Dave and I.  Also a big thanks to the Kentucky Administrative Office of the Courts (desperately in need of a nickname) for lending their facilities.  They continue to be a big supporter of the development community in that area.  Other states’ organizations would be wise to follow their lead.

    Registration can be found here.

    Directions can be found here.

    The agenda is much the same, though we will make a greater effort to include Lab Management on the second day:

    Day 1 – September 23, 2010

    Welcome time: 8:15 AM

    Introductions/Kick Off: 8:30

    • Mike Gresley, Microsoft

    VS2010 Business Value Overview

    • Statistics
    • People/Process/Tools

    Why Process

    • Process discussion, Scrumdamentals
    • Review Visual Studio Scrum Template

    Lunch (Many restaurants north of I-64)

    Team Explorer overview

    • Customizing VS2010
    • Connecting to TFS
    • Work Items Overview
    • Documents Overview
    • Reports Overview
    • Build Overview
    • SharePoint
    • Web Access

    Project Management

    • Requirement Gathering
    • Planning

    Day 2 – September 24, 2010

    Team Build

    • Setting CI
    • Branch/Merge
    • Deployment

    Architecture Tools

    • Overview
    • Hotfix


    • TDD
    • Code Tools/Analysis/IntelliTrace …
    • Layer Diagrams

    Database Tools

    • Schema Management
    • Data Management
    • Testing
    • Deployment


    Test Manager

    • Setup
    • Running
    • Report


    • Excel Reports
    • Dashboard
    • SSRS

    Team Lab Management (Time Permitting)

    Retrospective (30 minutes)


    Look forward to seeing everyone there!

    Event: TFS 2010 Overview, Scrum integration: June 22-23

    [Updated: An offline, PDF agenda is available here]

    Around a month from now Alexei Govorine of Quick Solutions and I will be leading a free, two day event diving into Team Foundation Server 2010 and its uses within a Scrum development organization.  This is my first year being a part of this event, but Alexei has a number of years under his belt now.  The agenda is quite aggressive, which will certainly be to the benefit of the audience.  I highly encourage those evaluating Team Foundation Server as well as those looking to get the most out of an existing Team Foundation Server deployment to come be part of this event.  An agenda is available below (offline PDF version here) and you can register here.


    Day 1 · June 22nd Day 2 · June 23rd
    Keynote Development Practices
    Business Value Overview Database Tools
    Why Process Team Build
    Team Explorer Test Manager
    Project Management Reports
    Architecture Tools Retrospective


    If there are questions or you have topics you feel strongly about covering hit me up on Twitter @cromwellryan.