compatibility TFS Update 1 backups on TFS Update 2 backups? - tfs

We just learned this morning that in TFS 2012 Update 2 they integrated backups in TFS rather than you having to install the power tools to get backup functionality. Is there any compatibility picture between the backups created with update 1 & the power tools with the scheduled backup feature in TFS 2012 Update 2? Our production server is running 2012 update 1 and the other machine we are trying to restore is running 2012 Update 2.
We are trying to restore a backup of prod to this other server but when we choose "List Backups" in the Restore Database functionality of the Scheduled Backup tool it doesn't list anything when we point it to our production backup folder.

The rules are rather simple:
When restoring a non-detached collection backup, you must restore to the same version. TFS will balk if they're not at the same level. An upgrade will change data structures and stored procedures.
When restoring a collection that has been detached you can restore and attach it to the same version or (most) newer versions (there are limitations, for example: 2012 rtm and 2012u4 can be attached to 2013, but TFS 2012u1, 2 and 3 cannot)
You cannot restore a backup from a higher version on an older version of TFS. You must first upgrade the target server.

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 restore TFS 2015 DB on TFS 2018?

I did a pre-production upgrade of TFS 2015 to TFS 2018 on another Windows server. It worked fine. During my TFS 2018 tests developers submitted new code to TFS 2015. Now, I would like to restore the latest TFS 2015 DB on TFS 2018 again and switch all dev's workplaces to TFS 2018.
Do I need to repeat whole TFS 2018 installation process to upgrade TFS 2015 to TFS 2018 or there is another way of doing this?
If I need to repeat TFS2018 installation, do I need to uninstall TFS 2018 before that?
Thanks
No, you do not need to uninstall: simply remove the Application Tier configuration. You can do it easily from the Administration Console (screenshot is for removing the Proxy feature, simply what you need).
Pre-production upgrade is just a dry run of your upgrade in a production environment.
Usually we use this to test your upgrade. This process test upgrades the databases. You can use this to simultaneously test your TFS 2018 on another hardware while continue to use your existing older TFS up.
Once you are ready for upgrade, restore the databases again and just use the Production Upgrade scenario during the server configuration wizard.
Not sure if you would like to restore the latest TFS 2015 DB on TFS 2018 on production environment or pre-production environment.
If you want to restore the newly changes on TFS2015 to pre-production TFS 2018 environment. It's not a common situation, usually we will abandon the pre-production environment. If you insist on this, you may have to re-upgrade to TFS2018 with pre-production style again. You could also try to back up the database on TFS2015 and restore it in TFS2018 pre-production environment. And you may have to change server IDs which ensures that this deployment will not interfere with the production environment.
Otherwise, suggest you directly move the changes in the production environment later, a tutorial for In-place upgrade to TFS2017(similar to TFS2018 without sharepoint) for your reference.

Updating previously migrated TFS 2013 -> TFS2015 database

I have TFS 2013 update 5 installed in a virtual environment (VMWare ESXi 5.5) and I wanted to test upgrading to TFS 2015. I cloned the VM and changed the TFS ID. After a long battle with sharepoint (everything is running on the same VM at this point, App-Tier, Data-Tier, and Sharepoint Foundation 2013) I got everything working again on the clone at TFS 2013 version. I then performed an in-place upgrade on this clone to upgrade it to 2015 and it worked perfectly.
Now what I want to do is take the most recent backup of the TFS2013 original server databases and move that to the already upgraded TFS2015 server. I have not been able to do this and successfully trigger "re-upgrading" of the database.
What databases should I restore to the clone "TFS2015" server (should I overwrite Tfs_configuration at this point, for example)?
What steps should I perform after restoring the latest backup from the TFS2013 data-tier to the TFS2015 data-tier to trigger an upgrade of the database?

Migration from TFS 2005 to TFS 2010

I have installed TFS 2010 on a new server (vmware running windows server 2008 r2) and restored from backup my old TFS 2005 Database onto the new server. The installation seems to have succeeded - I can create a NEW TFS 2010 team project and I can do checkin/checkout for it.
I made a mistake, however, with the TFS 2010 configuration manager - I ran the advanced configration wizard and NOT the upgrade wizard.
Now I don't see my old TFS 2005 team project and the upgrade wizard is now disabled.
In order to fix my mistake I tried this:
TFSServiceControl quiesce
tfsconfig import /sqlInstance:MyServer\DBinstanceName /collectionName:MyImported /confirmed
This is the output of this commands:
TF255152: Service is not running: TFSJobAgent
The upgrade of the project collection MyImported has been queued.
Waiting on the upgrade operation to complete.
...and now I am waiting for too much time for this operation to complete (my version control DB is 15 GB).
How can I import my old TFS 2005 team project to the new TFS 2010 server?
Here you go it supports inplace upgrades...
If you have to do a migration and it is currently jacked up then I would simply start from scratch. You'll spend far less time doing this than trying to fix the issues.
If you choose an install (advance configuration wizard in your case) instead of an upgrade, what happens is that new configuration and default collection databases are created for you, and your restored 2005 databases are not touched.
The safest way to deal with this issue is, like Chris suggested, to start from scratch. You wouldn't need to restore your 2005 databases again though, all you need to do is to uninstall TFS, make sure the new Tfs_Configuration and Tfs_DefaultCollection databases got deleted, and reinstall TFS and configure again with the Upgrade wizard. Installing TFS 2010 should be fast.

How to take total TFS 2015 backup and restore them to another server

I have TFS 2015 in Windows server 2008r2, for the disaster recovery and some precautions I would like to do the existing TFS backup and restoring them to another server, what is the best way to do this ?
TFS version is 2015 update 4 and SQL server 2014.
Please suggest me something.
It is a well documented process that is pretty prevalent online.
The official documentation is here
You will backup databases (config and collection)
Restore
Install and configure TFS app tier only and point it to the restored databases.

Resources