Preparing TFS machine for Restoration
Install the following:
- Windows Server 2008
- SQL Server 2008 R2
- TFS 2010
After preparing the machine, perform the following steps:
Open the command prompt as administrator and run the command iisreset /stop
Stop the agent services by running the command net stop TfsJobAgent
Now, from the Backup of SQL Server databases restore the Tfs_Configuration database.
Change the path of the command prompt to the following:
C:Program FilesMicrosoft Team Foundation Server 2010Tools
Next, run the following command:
TFSConfig PrepSQL /SQLInstance: JI-TFS (Where JI-TFS is the instance of SQL – change it according to your SQL instance on the TFS machine.)
The result will be:
Restore all database backups except for Tfs_Configuration database:
Note: Databases displayed in the screenshot are for reference only and will be different in your server.
With the command prompt path set to C:Program FilesMicrosoft Team Foundation Server 2010Tools, run the following command:
TfsConfig registerDb /sqlInstance:JI-TFS /databaseName:Tfs_Configuration
Launch the Team Foundation Server Admin Console, navigate to Application Tier page and click on Reapply Account.
On the Reapply Service Account dialog box, enter credentials of the user account used for installing TFS, and then click OK.
The service account update process will start showing you the progress. Once the process is completed successfully, click Close.
On the command prompt, type the following command to start the Job Agent
net start TfsJobAgent
Next, start IIS
In the Application Tier console, click Change URLs and update the primary URL for accessing your TFS.
In order to change the name of the machine in Application Tier section, clear the check box to see the machine.
The old name will be removed in a period of three days.