Let's continue our discussion around Failover options in TFS. We already spoke about Backup/Restore, SQL Mirroring or SQL Clustering. One more option available is SQL Log Shipping. Log Shipping is very close to Mirroring. The only difference is Mirroring is almost real-time synchronization of databases whereas Log shipping is time delayed synchronization. In short you can synchronize the databases every X minutes. This helps when the geographic locations of primary and secondary servers are far apart for e.g. if you want to have Primary server in US and Secondary backup server in Asia. You do not want to do mirroring in this case, as it may slow down the primary server.
Caution: This is not an officially supported configuration. I have tried it and it works fine. Please test this on your test environments before trying it in production.
Terminology: Primary Server – Main TFS Data Tier, Secondary Server – Backup Data tier Server
Before you begin you should have installed SQL Server 2005 on secondary server. Following are the steps to setup Log Shipping for TFS
Configure Log shipping
Note: You should configure the transaction log shipping schedule (step 6.c) for all databases at same time. For e.g. all of them can run after every 1 hour starting 7:00PM 01/01/2007. This is crucial to keep the databases in sync.
Failover to the secondary Database
Important: To failover to the secondary server we have to failover all the databases at the same time.
Restore database <TFSDBName> with Recovery
cd Microsoft Visual Studio 2005 Team Foundation Server\Tools
TFSAdminUtil RenameDT <SecondaryServer>
TFS Databases: ReportServer, ReportServerTempDB, STS_Config_TFS, STS_Content_TFS, TfsBuild, TfsIntegration, TfsVersionControl, TfsWarehouse, TfsWorkItemTracking, TfsWorkItemTrackingAttachments, TfsActivityLogging
Note: We are working on officially supporting this configuration. I will keep you all updated
Please let me know if you tried using these steps and found them useful.
Sudhir Hasbe has posted a walkthrough for using SQL Log Shipping with TFS . Check it out!
We continue to evolve and improve upon the TFS reliability and disaster recovery story. Fundamentally
Eric Lee on Work Item Moving Tool is back. Don't forget this file. Marcel de Vries on How to waste...
This is a refresh of an original post by Suhid Hasbe and updated for TFS 2008. There are several options