How to test new TFS server without upgrading original - tfs

We have a TFS 2013 instance that requires upgrading. I plan to use Azure DevOps 2019 on prem. I'd like to have the two environments running at the same time so I can verify. What I'd like to do is:
Do full install of Azure DevOps server, creating new DBs on a new SQL server. I do NOT want to upgrade our existing TFS at this point.
Copy the data from the original TFS SQL instance to the new SQL instance, performing an upgrade along the way.
Test and verify all data successfully migrated to 2019
Schedule a blackout window and repeat the import process once again
Can anybody advise if this is do-able or refer me to a guide?
Tks

Easier than I thought. Just needed to run the pre-production upgrade wizard.

Related

TFS 2010 Upgrade to TFS 2013 - Can Window Server 2019 Standard Support the Upgrade?

We are looking to carry out the following TFS upgrades in our Production environment:
Upgrade TFS 2010 to TFS 2013.5
Upgrade TFS 2013.5 to TFS 2019
To support both migrations, we have a Windows Server 2019 Standard edition to host the Application Tier. The Data Tier is to be installed on a dedicated SQL box.
The Microsoft website however lists Windows Server 2012 (Essentials, Standard, Datacenter) as the latest server operating system edition required for TFS 2013.
My question therefore is, can we still perform this planned upgrade to TFS 2013 on a newer edition of Windows Server, in our case Windows Server 2019 Standard edition?
I agree with Daniel, please follow the documentation exactly.
Since you can upgrade from TFS 2010 --> TFS 2012.3 --> TFS 2019, or from TFS 2010 --> TFS 2013.5 --> TFS 2019, you could consider trying to upgrade from TFS 2010 to TFS 2012.3 or TFS 2013.5 on the same Windows Server 2008 R2 Enterprise server, and then migrate to Windows Server 2019 Standard edition when upgrade to DevOps Server 2019.1.1(TFS 2019.1.1).
"Supported" means "tested and known to work". Later OS versions haven't been tested and may not work, or TFS may not even install in the first place.
I've done dozens of TFS upgrades in my day. My suggestion is to follow the documentation provided by Microsoft exactly. If an OS isn't listed as a supported OS, then don't use that OS.
So after much to-ing and fro-ing and numerous debates and suggestions from various sources on Stackoverflow, in the end this is how I managed to successfully complete my migration upgrade from TFS 2010 to Azure DevOps Server (TFS) 2019.1
There are however 5 very important points I wish to emphasise:
This was a complete migration upgrade (not an In-place upgrade) and so each move to a later TFS version was done using new/replacement hardware.
Both upgrades were done, based on the excellent YouTube tutorial by Mohamed Radwan which can be found here and relies heavily on the TFSBackup and TFSRestore utilities, both of which have shipped with all versions of TFS, I believe since the 2012 edition.
I only migrated the TfsConfiguration database and our Project database.
There was no migration of SharePoint.
There was no migration of Reporting Services.
We had no scheduled backups set up in the TFS 2010 Admin console.
TFS 2010 to TFS 2013 - Some Useful Points to Note
The backup of my TFS 2010 databases were executed from the Tools directory of the TFS 2013 instance (once installed), on the new dedicated hardware for my app tier.
Following a successful database restore using the TFSRestore utility, there are generally three key tasks required which use the TFSConfig tool to ensure data integrity between the two TFS instances aren't compromised or corrupted. These are the PrepareClone, ChangeServerID and RemapDB tasks executed in this same order.
The PrepareClone task failed when executed and after days of trying to troubleshoot the issue, I gave up in the end due mainly to the fact that the PrepareClone command removes information about scheduled backups, SharePoint, and Reporting resources from an Azure DevOps Server deployment and is used in two circumstances:
When you move a deployment to new hardware but want to keep using the old deployment.
When you clone an Azure DevOps Server deployment.
We didn't have any scheduled backups, SharePoint or Reporting Services included within the scope of our migration and were certainly not planning to keep using the old deployment long-term, except for a few days of validation and testing of the migration upgrade. As such, I ignored the error.
I was also counting on the fact that if the ChangeServerID command run successfully, this would ensure that the two instances were now discrete anyway, having been assigned unique GUIDs. Fortunately, the ChangeServerID task succeeded.
I also then executed the RemapDB command but in truth this wasn't even required as the ChangeServerID command had already completed the remapping task.
From this point on, the migration went like a dream and there was absolutely no issues encountered. Another key point to add, the backup of our TFS 2010 instance was done only after I'd ensured there was no user logged onto the system and following the backup, I took the 2010 instance completely offline.
TFS 2013 to Azure DevOps Server (TFS) 2019.1 - Some Useful Points to Note
Again using the TFSBackup and TFSRestore utilities (this time from the Azure DevOps Server 2019.1 Tools directory) and pretty much repeating the steps for the previous migration upgrade, I managed to get us onto our target 2019 instance without single hitch.
Even better, with Azure DevOps 2019, the TFSConfig PrepareClone, ChangeServerID and RemapDB tasks have been incorporated into the app tier configuration wizard, meaning you're not required to manually run them from the commandline. The tool takes care of it for you in its entirety, which is excellent!!
The new Pre-Production Upgrade option enabled me to simulate and somehow perform a dry-run of the final upgrade, another excellent feature incorporated into the Server Configuration Wizard for Azure DevOps Server 2019.1
My Concluding Remarks
Judging by how easy and simple it was to use, its heavy use of automation and clearly being far less likely to result in any disaster, I am rather surprised the TFSBackup and TFSRestore tools aren't recommended as perhaps the current best migration options, subject of course to the type of migration targeted.
I have done TFS upgrades in the past which were based on the older process of quiescing the project collection, detaching and re-attaching the database(s) to the target instance, etc, etc and must admit there's hardly any chance I'd be going back to that in future if I can help it, as the TFSBackup and TFSRestore tools are a much, much better, safer and reliable option in my view.
Hopefully, this feedback will help the next person who may embark on a similar journey to upgrade TFS from the 2010 edition to a later version.

How to perform code migration from TFS 2018 to Azure DevOps?

We are trying to migrate code from TFS2018 to Azure DevOps. I am new to code migration from TFS to VSTS. I would like to know is there any tool for code migration?
I saw TFS-GIT utility. I am really not sure how much efficient this tool.
GIT-TFS list remote repostiory
You may do it through OpsHub tool: OpsHub Visual Studio Online Migration Utility
My recommendation would be to either upgrade your on-premise server to Azure DevOps Server 2019 or the latest Team Foundation Server 2018 update pack that's supported by the migration tool.
You can perform this upgrade on a clone instance of your existing server, so it won't break or change your existing machine or database in case anything goes wrong.
We regularly perform these types of migrations and we generally use a temporary Azure Virtual Machine. We install SQL Server on it, we restore the backup of the on-premise server, we install the desired TFS application tier version on it. If the Azure machine is joined to your domain, then that's all you need to start the import into Azure DevOps. If the machine isn't domain joined, be sure to turn off the AD Sync job as part of the migration. My colleague Jasper has a couple of scripts to fix that for you.
Alternate options. In my opinion there aren't any. At least not good ones. There is a whole set of tools that an migrate parts of TFS to Azure DevOps, tools like OpsHub, git-tfs, git-tf, Migration Tools for Azure DevOps. None offer a complete migration, some do work items, some sources, some builds, but none of these offer a complete migration.
All of these also have the issue that they reset metadata such as Commit/Approval dates, work item IDs. Which will impact retention jobs, history and other things you may care about.

Migrating from TFS 2013 to Azure DevOps Server 2019: Pre-prod v/s Prod migration

I need to migrate a TFS 2013 instance to Azure DevOps Server 2019. I want to setup a new instance of Azure DevOps server with all the data migrated over from TFS 2013 and both the instances up and running at the same time. The plan is to decommission the TFS 2013 instance after a few weeks.
For testing purposes, I followed the steps below:
1. Setup a server in a completly isolated network.
2. Backed up the TFS 2013 databases using the scheduled backups from TFS admin console.
3. Restored the databases to a new instance of SQL Server 2017.
4. Started installation of Azure DevOps Server 2019 on the new server, I pointed it to the restored databases and it detected the schema and gave me two options: Production Upgrade and Pre-production upgrade testing. I chose the latter option.
The installation wizard took care of remapping the db connection strings(tfsconfig remapdbs), changing server and collection ids(tfsconfig changeserverid) and removed the scheduled backup jobs to avoid conflicts with the existing TFS 2013 instance.
The test migration completed successfully. Now, I want to setup the production instance on new servers that are within the same network as the existing TFS 2013 instance.
Shall I select "pre-production upgrade testing" again as I need to have both TFS 2013 and 2019 running at the same time?
Or Shall I select "Production Upgrade" this time? Is there anything I need to take care of during the upgrade so that the two instance don't conflict with each other?
PS: there are no backup jobs running on the TFS 2013 instance.
I tried the "Production upgrade" and understood that it will perform an in-place upgrade. In my scenario, I wanted to setup a separate new instance and the "Pre-Production Upgrade Testing" is the appropriate choice in this case as it automatically takes care of the remapping of database connection string and change server and collection identifiers.

TFS server was lost while backend SQL Server is intact. How can I migrate source code to VSTS?

I found migration guide which uses command line. However, since there is no TFS server, I can't use the TFS migration tool.
A few workaround ideas I have ...
Can I export data from SQL Server directly and then import that into VSTS?
Can I install TFS (fresh new install on new VM) and connect to the existing SQL Server somehow?
I have no idea if above idea would work. If not, what possible options do I have?
Just reinstall the TFS application tier. When the wizard opens, you can choose "Application Tier Only" which will walk you through connecting it to the databases.
Make sure you reinstall the same version of TFS you were using before (including Update) -- if you were using TFS 2015 Update 3 before, reinstall TFS 2015 Update 3. Don't try to install Update 4 or Update 2.

Replacing TFS App Tier

I plan on replacing my existing app tier (TFS 2010) when upgrading to TFS 2013. I'll quiesce the services and rename the old machine from MYTFS to MYTFS_OLD. The new app tier will have a fresh, un-configured installation of TFS 2013 and will be renamed from MYTFS_NEW to MYTFS.
My question is, will it be necessary to run the ChangeServerID or RemapDB commands if the new app tier is named the same as the old one?
If I understand your scenario correctly you will end up with:
A new server that's completely clean
The 'old' database server that contains all the TFS databases.
If that's the case, you should install TFS and select 'Upgrade'. You then point your TFS Application Tier to your database server and let TFS upgrade your databases.
You cannot have both version running on the same set of databases.
Study the ALM Ranger's Upgrade guide before doing anything.
I don't think you need to run remapdbs or changeserverid commands:
you typically need remapdbs when the server name changes which is not the case
you should use changeserverid if you plan to clone a TFS server meaning that you have restored TFS databases to a different machine and set up another TFS instance on that machine without killing the original server. Again it's not the case from what you have described here.

Resources