Restoring Team Foundation Server to the Same Server

In some disaster recovery scenarios, you have to restore the data onto brand new hardware. However, sometimes you don't have a disaster situation where you need to use a new server. It could just be that the data has become corrupt in the database, and you want to roll back to an archived copy. In this section, you learn the steps required to restore a Team Foundation Server backup onto the original server. In a later section, you learn how to restore onto a new server.


To follow these instructions, you must have the data-tier Team Foundation Server from which the backups were taken in good working order.

There are five steps involved in restoring a Team Foundation Server from its backup. These steps should be performed in the following order:

  1. Stop Application Tier Services:

    1. On the application tier, open the Reporting Services Configuration Tool, as described previously, click the Server Status link; then click the Stop button. This will stop the report server.

    2. Next, open the Services window by clicking StartControl PanelAdministrative ToolsServices.

    3. Right-click the following services and click Stop:

      • SharePoint Timer

      • TFSServerScheduler

    4. Finally, you need to stop Internet Information Server. To shutdown IIS, simply open a command prompt and type iisreset /stop.

  2. Restore Team Foundation Server databases.

  3. Recreate the Data Warehouse.

  4. Start Application Tier Services:

    1. To restart IIS, simply open a command prompt and type iisreset /start.

    2. Open the Services window, right-click the following services, and click Start:

      • TFSServerScheduler

      • SharePoint Timer

    3. Open the Reporting Services Configuration Tool, click the Server Status Link, and click the Start button.

  5. Flush the Client Work Item cache.

Restoring Team Foundation Server Databases

To restore the Team Foundation Server databases, you once again make use of SQL Server Management Studio. Open SQL Server Management Studio as described previously. In the Object Explorer on the left side of the screen, select the plus sign beside the Databases folder to expand it. This folder lists all the databases installed on this SQL server. You have to restore each database individually. The following is a list of the databases you need to restore:

  • ReportServer

  • ReportServerTempDB

  • STS_Config_TFS

  • STS_Content_TFS

  • TfsBuild

  • TfsIntegration

  • TfsVersionControl

  • TfsWarehouse

  • TfsWorkItemTracking

  • TfsWorkItemTrackingAttachments


The TfsActivityLogging database is not restored, as it is not critical to the operation of Team Foundation Server; it can be restored if desired.

  1. To start the restore process on a database, right-click the database in SQL Server Management Studio. Select Tasks, then Restore, and then Database. This opens the Restore Database window, as shown in Figure 5-10.

  2. In the Source to Restore section, click the From device radio button to select it. Click the ellipse button to open the Specify Backup window. Figure 5-11 shows the Specify Backup window.

  3. Click the Add button, and select the appropriate backup file. Click OK to close this window and return to the Restore Database window. In the left pane of this window, select Options to view the different restore options. Check Overwrite the existing database. Make sure the paths in the Restore the database files section, for each file, are valid paths.

image from book
Figure 5-10

image from book
Figure 5-11

If everything looks good to you, click OK to close this window and restore the database. Remember, you have to perform this procedure on each individual database in Team Foundation Server.

Recreating the Data Warehouse

Next, you recreate the data warehouse for Team Foundation Server. You do this from the application-tier machine using the setupwarehouse command-line tool. This command uses the TfsWarehouse database to recreate the Analysis Services data cube. On the application-tier machine, open a command prompt, and switch to the c:\Program Files\Microsoft Visual Studio 2005 Team Foundation Server\ Tools directory. The format for running this command is:

 Setupwarehouse-o-s <DataTierServer> -d TfsWarehouse-c warehouseschema.xml-ra <ReportAccount> -a <ServiceAccount> 

Where <DataTierServer> is the name of the data-tier server, <ReportAccount> is the report account you created when you installed Team Foundation Server, such as TFSREPORTS, and <ServiceAccount> is the account that runs the Team Foundation Services, such as TFSSERVICE. Figure 5-12 shows an example of running this command:

image from book
Figure 5-12

For more details on the setupwarehouse tool, type the following at a command prompt:

 setupwarehouse /? 

Refreshing the Work Item Cache on Client Machines

Finally, you need to force the client machines to refresh their work item cache.

  1. To do this, open Internet Explorer on the application-tier server, and navigate to :8080/WorkItemTracking/v1.0/ClientService.asmx">http://<appservername>:8080/WorkItemTracking/v1.0/ClientService.asmx. This opens the Client Service Web Service page, shown in Figure 5-13.

    The ClientService Web Service contains many different Web methods used by Team Foundation Server.

  2. Click the StampWorkItemCache link to view the Web method. On the StampWorkItemCache Web method page, click the Invoke button to execute the method. A second blank Internet Explorer window may open while the method is running. Once the method is finished, close both Internet Explorer windows.

image from book
Figure 5-13


To refresh the work item cache, you must be a member of the Team Foundation Server Administrators group.

At this point, your Team Foundation Server has been restored. You should test to make sure you can connect to the application tier and the data tier from your client, and that all the data has been restored properly.

Professional Team Foundation Server
Professional Team Foundation Server
ISBN: 0471919306
EAN: 2147483647
Year: 2004
Pages: 168

Similar book on Amazon
Professional Team Foundation Server 2010 (Wrox Programmer to Programmer)
Professional Team Foundation Server 2010 (Wrox Programmer to Programmer)
Professional Application Lifecycle Management with Visual Studio 2010 (Wrox Programmer to Programmer)
Professional Application Lifecycle Management with Visual Studio 2010 (Wrox Programmer to Programmer)
Professional Scrum with Team Foundation Server 2010 (Wrox Programmer to Programmer)
Professional Scrum with Team Foundation Server 2010 (Wrox Programmer to Programmer)
Team Foundation Server 2008 in Action
Team Foundation Server 2008 in Action © 2008-2017.
If you may any questions please contact us: