Various options to migrate your TFS server - Netwoven

Various options to migrate your TFS server

By Asijit Giri  •  February 13, 2018  •  15617 Views

Various options to migrate your TFS server

In this blog, I am going to describe ways to migrate TFS repository.

Before jumping into the details, it is very important to know the source, target, TFS & SQL Server version you are using. You can review the system requirements here.

I have discussed here two ways of TFS Server migration to a different domain (The process is same if you are migrating to the same domain without user migration).

  • Using TFS Full backup.
  • Using TFS Project Collection Backup.

A.    Using TFS Full backup (different/same domain)

Migration of a TFS Server from XYZ.com to GSOFT.com domain using a full backup.

Here we used a single server topology for TFS & SQL Server. Please find the below steps.

1. Install the SQL Database server with SQL Server 2016 RTM Enterprise version on a VM Named – SQL2012.GSOFT.COM.

Various options to migrate your TFS server

2. Install ‘SQL Report Server – Native’ feature.

Various options to migrate your TFS server

3. Install SQL Server Analysis Service Multi-Dimensional Mode.

Various options to migrate your TFS server

4. Install and configure IIS on the server.

5. Install Team Foundation Server 2015 update 1.

6. Take the Full back up on source TFS Server i.e. on XYZ.com TFS Console which generated the below ‘.BAK’ and ‘.XML’ files.

Various options to migrate your TFS server
Various options to migrate your TFS server

7. Copy all the backup files to the target TFS Server.

8. Restore the backup using TFS console to the target SQL DB Server.

Various options to migrate your TFS server

It will generate 3 Databases on SQL DB Server.

Various options to migrate your TFS server

9. Back up TFS_Analysis database from XYZ.COM SQL Analysis Server. Copied the ‘.abf’ file to the target Server.

10. Restore the TFS_Analysis database to the target SQL Analysis Server.

Various options to migrate your TFS server

Edit the connection information from the properties of the TFS_Analysis and provide the new SQL server name and database name.

11. Take back up of the Encryption key from the source report Server.

12. Restore Report Server Encryption key on target Report Server.

Various options to migrate your TFS server

13. Configure the Report Server URL.

Various options to migrate your TFS server
Various options to migrate your TFS server

Report server successfully configured.

14. Run the configuration wizard – Application-Tier Only. It failed while it was checking the readiness. The error was – “Install SQL server analysis services or the SQL Server client tools on the application tier to ensure that analysis services object model is present for warehouse processing”

Various options to migrate your TFS server

Spend a couple of hours to troubleshoot the Analysis Service issue but no luck. It observed TFS Server was unable to communicate with SQL Analysis Server instance. Though, it might be an issue with the SQL Version mismatch with TFS Server. Then I double checked the System requirements for TFS Server and found SQL Server 2016 is only supported by TFS 2015 Update 3 and onwards.

Various options to migrate your TFS server

We are trying to configure TFS Server 2015 Update 1 with SQL Server 2016 which is not supported. Then the question may come – Why we were trying to configure with SQL 2016 with TFS Server 2015 Update 1? Answer: we were trying to keep the same version on the target as per source TFS server. In the source, the TFS server version was TFS Server 2015 Update 1 with SQL Server 2016. That’s why I focused on system requirements at the beginning of this blog. We had to upgrade TFS Server which supports SQL Server 2016 i.e. TFS 2015 Update 3.

15. Install and upgrade TFS Server version to TFS 2015 Update 3 on TFS server.

16. Run the Upgrade Wizard. This time we did not run the Application tier wizard as we were on a higher version of TFS than source TFS Server. Successfully verified the configuration and connected to the Analysis Service. TFS Server upgraded successfully.

Various options to migrate your TFS server
Various options to migrate your TFS server
Various options to migrate your TFS server

17. Launch TFS Admin console.

Various options to migrate your TFS server

The project collections are showing under the collections.

Various options to migrate your TFS server

18. Change the TFS server URL. From the TFS admin console change the URL and port as per the need. Create a DNS record for the URL. TFS URL is set to https://tfs.gsoft.com. Update the URL in IIS.

19. This step is only for who is migrating the TFS Server to a different domain. You need to migrate the Users who have a same Username in the target domain. Need to run the following command in command prompt by changing the directory to “C:\Program Files\Microsoft Team Foundation Server 14.0\Tools”

TFSConfig Identities /change /fromdomain:XYZ /todomain:GSOFT

This converts the users from XYZ.com to GSOFT.com and keeps the permission on the TFS Database.

20. The URL was accessible inside and outside (another server in the domain) of the TFS Server – http://tfs.gsoft.com:8080/tfs/. Abled to browse the TFS Project collection and code.

Various options to migrate your TFS server

That’s all you have to do for migrating TFS to a different or to the same domain.

B.    Using TFS Project Collection Backup (different/same domain)

Migration of a TFS Server from GSOFT.com to GTECH.com domain using project collection backup.

Multiple project collections may reside in a single SQL database. In our case one project collection resides in a single SQL database.

Here we used a single server topology for TFS & SQL Server. Please find the steps described below.

Here are the steps described briefly.

1. Install the SQL Database server with SQL Server 2016 RTM Enterprise version on a VM Named – Googlevm2.GTECH.COM.

Various options to migrate your TFS server

2. Install ‘SQL Report Server – Native’ feature.

Various options to migrate your TFS server

3. Install SQL Server Analysis Service Multi-Dimensional Mode.

Various options to migrate your TFS server

4. Install and configure IIS on the target server.

5. Install Team Foundation Server 2015 update 3 on the target server.

6. Configure the TFS Server.

Various options to migrate your TFS server

7. Back up a TFS Project collection from source TFS Server

a. Open the TFS Admin Console on the Source TFS. Stopped the Project Collection which I wanted to move.

Various options to migrate your TFS server

b. Detach the project collection from the TFS Server.

Various options to migrate your TFS server

c. Take the Full back up of the Project collection database.

8. Copy the backup file to Target SQL DB VM.

9. Restore the Database backup on the Target SQL Database server and provide same database name.

10. Attach the project collection from target TFS Server.

Various options to migrate your TFS server
Various options to migrate your TFS server

Log can be reviewed here – C:\ProgramData\Microsoft\Team Foundation\Server Configuration\Logs

The 1056 warning for orphan users whose permission kept in the database. The migration of users from different domain had been discussed in step 12.

11. Change the TFS server URL. From the TFS admin console changed the URL and port as per the need. Create a DNS record for the URL. TFS URL was set to https://tfs.gtech.com. Update the URL in IIS.

12. This step is only for who is migrating the TFS Server to a different domain. You need to migrate the Users who have a same Username in the target domain. Need to run the following command in command prompt by changing the directory to “C:\Program Files\Microsoft Team Foundation Server 14.0\Tools”

TFSConfig Identities /change /fromdomain:GSOFT /todomain:GTECH

This converts the users from GSOFT.com to GTECH.com and keeps the permission on the TFS Database.

13. The URL was accessible inside and outside (another server in the domain) of the TFS Server – https://tfs.gsoft.com/tfs/ . I could browse the TFS Project collection and code. I was getting certificate error as the certificate yet to be assigned.

Have fun! Hope this helps someone out there.

2 comments

  1. What would be the steps be for an in place update on a Windows 2012 R2, SQL 2014 R2 system?
    Or would you not recommend it

    1. Hello Ian,

      You did not mentioned the source & Target TFS server version. However, in place upgrade supports on TFS 2013 & 2015. I think it is not the best way to upgrade your TFS environment. If anything happens during the upgrade you may face longer down time or upgrade hazard.

      But if you have same identical Dev/Stage environment compare to your Production environment, you can always Test the in-place upgrade over there before proceeding to Production.

      Thanks,
      Asijit

Leave a comment

Your email address will not be published. Required fields are marked *

Dublin Chamber of Commerce
Microsoft Partner
Microsoft Partner
Microsoft Partner
Microsoft Partner
Microsoft Partner
Microsoft Partner
Microsoft Fast Track
Microsoft Partner
Microsoft Fabric
MISA
MISA
Unravel The Complex
Stay Connected

Subscribe and receive the latest insights

Netwoven Inc. - Microsoft Solutions Partner

Get involved by tagging Netwoven experiences using our official hashtag #UnravelTheComplex