Domanda

How do I get back TFS(2010) data after I uninstalled it by mistake?

I have SQL Server backups for TFS_Configuration, TFS_Warehouse, TFS_ProjectName1 and TFS_Analysis databases.

I installed a new TFS and now I have new TFS_Configuration, TFS_Warehouse, TFS_NewProjectName and TFS_Analysis databases but I want back the old data from previous TFS.

I try to follow the steps from http://msdn.microsoft.com/en-us/library/ms404869%28v=vs.100%29.aspx but now I'm stuck trying to restore the databases from backups (I get verification errors before restore start, that said the databases are different). What should I do?

The main goal is to recover the content files of the old TFS. What options do I have? Is it possible to programmatically read (to a local folder) the old TFS data?(Which table should I read? In this way I recovered the documents stored in WSS_Content)

Please help! We don't have any data to work with.

È stato utile?

Soluzione 2

Here are the steps I followed and the problems that I encountered:

  • I used "Restore Data to the Same Location" http://msdn.microsoft.com/en-us/library/ms252458.aspx
  • After I uninstalled TFS I backed up and removed all TFS databases from SQL Server: TFS_Configuration, TFS_Warehouse, TFS_ProjectCollection, ReportServer, ReportServerTemp. (I didnt do a backup but I deleted TFS_Analisys from SQL Server Analysis instance)
  • I uninstalled SharePoint and then I tried to install it back but I failed. The solution was to remove WSS_Content from SQL Server, then the install succeeded.
  • I installed a fresh TFS (without creating the TFS_ProjectCollection)
  • Errors at Reporting Services occurred.(because I deleted ReportServer, ReportServerTemp). were solved using Reporting Services Configuration:Open Database tab ->ChangeDatabase->Create new Report server database ...continue with default options.
  • I restored the ReportServer, ReportServerTemp from backups.
  • After TFS install, I stopped TFS Services: TFSServiceControl quiesce, then I restored in SQL Server the TFS databases from backups (with OVERWRITE option)
  • I rebuilt only analisys service:

TFSConfig RebuildWarehouse /analysisServices Update All Service
Accounts TfsConfig Accounts /add /AccountType:ApplicationTier
/account:YourTFSServicesAccount /password:YourTFSServicesPassword
/SQLInstance:YourSqlServer /DatabaseName:TFS_Configuration

TfsConfig Accounts /add /AccountType:ReportingDataSource /account:YourTFSServicesAccount /password:YourTFSServicesPassword /SQLInstance:YourSqlServer /DatabaseName:TFS_Configuration

  • Clear the Data Cache on Servers
  • Register Tfs_Configuration

    TFSConfig registerDB /SQLInstance:YourSqlServer /DatabaseName:Tfs_Configuration
    TFSServiceControl unquiesce

  • From SQL ServerConfiguration Manager: start services you need (Analysis Services)

  • From Services start SQL Reporting Services

Altri suggerimenti

Don't follow the procedure "Move Team Foundation Server from One Hardware Configuration to Another", it's not necessary.

Basically what you have to do is:

  1. Install a new fresh TFS server.
  2. Move the Team Project Collection (TPC) to this new server.

But there's a trick, the step 2 can normally be done only if you properly detached the TPC beforehand, which is not your case. So you have to use the TFSConfig recover command to fix your SQL backup of the TPC (which you should create an extra copy before running this command, just in case).

One last thought, make sure the TFS version is exactly the same between the how server and the new one, your error about "database are different" may suggest you try to restore a TFS 2010 SP1 TPC on a TFS 2010 RTM (for instance).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top