简体   繁体   中英

Restore TFS 2010 databases on tfs 2015

Gone through lot of msdn documentation and forums but could not find solution.

Pre Crash state => Single server TFS 2010 on sql 2008.

Post Crash => SQL backups of all databases including tfs collections were available. (No TFS backups)

So I have inherited sql backups of 10 project collection databases and few TFS databases

Current State => Fresh single server tfs 2015/ sql 2012 installation. SQL Backups restored on SQL 2012 New project collections created on tfs 2015

However, when I try to attach the restored databases project collection from TFS admin

I get following error

TF254078: No attachable databases were found on the following instance of SQL Server: MyServerName. Verify that both the name of the server and the name of the instance are correct and that the database was properly detached using the detach command in the Team Foundation Administration Console.

I have referred to Why can't I attach TFS to a Project Collection that was restored to SQL Server (I think) correctly? but not much helpful in fixing.

Can these project collection dbs be actually restored on tfs 2015?

Kindly note, I don't have a 2010 setup to do a proper detach/ attach and I cannot alter new tfs 2015 projects .

You cannot attach a database backup of a TFS database that wasn't detached before. You'll need to start with a machine that doesn't have any TFS databases, install using the application-tier only installation type, restore your backed-up databases then use tfsconfig remapdbs from the commandline to set the right database server, service account etc.

The whole process is well explained in the a number of articles and the process is slightly different for each version of TFS.

You have one danger though, since the databases were not backed up using the recommended TFS backup procedure, it may not be possible to restore TFS or it may restore but exhibit strange behavior.

This is why, in your case, I strongly recommend getting it running on the original server version, in your case TFS 2010. Then when it's running again, uninstall TFS 2010 and install 2015 on the same server. TFS 2015 should then offer the option to upgrade. Using this procedure you allow TFS 2010 to run its internal maintenance processes before you start moving a lot of data around in a database that is possibly in a corrupt state.

The process to Migrate databases using a full backup of the TFS server is outlined here:

After the migration follow the standard TFS 2015 upgrade procedures:

  • shut down TFS using tfsservicecontrol quiesce
  • backup all your databases
  • uninstall TFS 2010
  • reboot
  • install TFS 2015 in upgrade mode

After the upgrade you can detach your project collections from the (temporary) TFS 2015 machine, back them up and restore that backup to the new TFS 2015 server.

There isn't much else you can do. I've executed this procedure a number of times. If needed by installing to a Hyper-V VM running on my laptop or by temporarily installing Windows Server on a desktop. The Trial version of TFS 2010 would suffice, so getting access to the installation media should not be a problem, you can download it here . Be sure to install Service Pack 1 and the latest updates to it before attempting to restore the databases. You cannot restore a TFS database to an Application Tier server that has a lower patch level. If your backups contain a reportserverdatabase and warehouse or SharePoint installation you need to restore to Windows Server, if not you could opt to just install TFS on your desktop operating system temporarily.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM