Nick
Nick

Reputation: 871

Restore Team Foundation Server from SQL Server bak files

I accidentally deleted the wrong project in TFS 2018 Update 2. Then I found out that we do not use the regular backups for TFS. We just backup the databases.

On a test server I have installed tfs and restored the databases to SQL Server. However it will not allow me to configure tfs with those tables.

What can I do to get the data back? I do not need a perfect restore, but I would like to get the code and if possible the work items. Even getting the data directly from the tables is fine, but I am not sure how the tables are setup.

Upvotes: 0

Views: 584

Answers (2)

Nick
Nick

Reputation: 871

I installed TFS 2018 on a new server and was able to use the sql backup files. I then exported the code and then imported it into the existing server.

Upvotes: 0

Daniel Mann
Daniel Mann

Reputation: 59016

Unless someone from Microsoft provides you with specific SQL scripts, any attempt to restore the deleted project by copying data from one database to another is most likely going to accomplish two things:

  1. Break your TFS installation
  2. Leave you in an unsupported state

So don't do that.

You'll need to do a complete restore of the TFS instance, which should be possible assuming you have backups of all of the TFS databases (configuration and project collections). There is extensive documentation on how to do that.

Upvotes: 1

Related Questions