The difference of uninstall the complete application and unconfigure TFS - tfs

We had moved everything from TFS sever to VSTS include database, logs. Not sure if we will use it again in the feature.
For now, we have two choices: uninstall the complete application/delete database entirely and simply unconfigure TFS
What are the differences between them? I want to choose the appropriate one.

To "Unconfigure TFS", please go to the Team Foundation Administration Console on the Application Tier machine. Click on the server name and click on "Remove Feature"
By Removing the feature, we will be removing
The Application Tier configuration from the server (but we don't
remove the binaries)
Connection with Data tier (but the databases won’t be deleted)
TFS Website.
TFS Application Pools
TFS Services (The Visual Studio Team Foundation Server Job Agent)
You can do the same from command prompt, execute TfsConfig setup /uninstall:ApplicationTier command to unconfigure TFS Application Tier. (You can also use various switches to remove other features SharePointExtensions, TeamBuild and VersionControlP
roxy) from server machine.
Usually we'd like to refresh the TFS Application Tier setup to defaults in case there's an unintended change in services/IIS settings and we want to set it back to defaults. We give an option to Remove Application Tier/Features without having to uninstall the complete application.
Another usage is when you are using pre-upgrade for test, you could quickly remove Application Tier. Since everything have been migrated, if you don't need the TFS server any more, just simply uninstall the complete application and database.You could back up your database, once you want to use again. Just install a new application and restore your database.

Related

Complicated TFS 2017 Upgrade

I wish to upgrade my current TFS 2015.3 instance to 2017. It's not going to be quite as easy as advertised, however, due to some complicating factors. My scenario appears to be undocumented.
I'll be installing a new domain controller (moving from Server Essentials 2012 R2 to Server Essentials 2016).
The current OS is Server 2012 R2; I will be upgrading this as well, to Server 2016 (a clean install to a new VM).
Both of these new VMs must retain the same NETBIOS names as before.
The current SQL Server instance is 2014; I will be upgrading this as well, to SQL Server 2016.
The SQL Server instance for the current TFS instance is on a separate VM. I would like to consolidate this and put everything on a single VM. (I'm a solo developer putting a very light load on my server and I want to shed the extra complexity and overhead.)
Is it merely a matter of installing TFS 2017 and restoring from a 2015.3-generated backup? Will 2017 automatically apply any schema changes etc. during the restore process? Could it be that simple?
The closest question I could find to this is here, but unfortunately it doesn't quite address my situation.
Instead of doing a detach/attach upgrade there is another option available to you. detach/attach upgrades have had issues in the past and though most of these issues have been fixed, it's considered a suboptimal solution.
Instead, perform an Upgrade Installation.
Take a full backup of all your TFS 2015u3 databases and restore them to the new SQL server instance. You can create the full backup using the Team Foundation Server Admin Console, or use SQL Server Management Studio after stopping all TFS services on each Application Tier (in your case there is probably only one) using
TFSServiceControl quiesce
Now install TFS 2017 and perform the "upgrade" installation and point it to your existing databases. It will ask you if you want to upgrade them and whether you have a valid backup.
And after some time (upgrades can take a while, as data is moved around the databases), your TFS server will come back online. The installation wizard usually does all the mapping work required.
There is one big caveat, and that has to do with domain changes. If you are
installing in the same Windows Active Directory domain, you're good. But if your server is running in Workgroup mode you may want to remap all the identities in your TFS database prior to running the upgrade step. So install TFS, but do not configure yet. Run the following command
TFSConfig Identities /change /fromdomain:Domain1 /todomain:Domain2
Then use the upgrade option to have TFS use your database backups. The full explanation on doing a cross domain server migration is documented on MSDN. Be sure to safeguard your pre-upgrade backup until you've verified a successful upgrade.
We face almost the same thing, as our server was created for TFS 2013 and therefore has SQL 2012 installed.
Yes, it actually is as easy as your question states. When you attach the collection that you restored form the backup all the schema changes will be applied. Before then you configure the app tier of TFS and skip
An important thing though is to detach the collection before doing the backup. This copies various configuration into the collection database so that it is self-contained and can be moved to another server. You then only move the collection database to the new server.
Here is how in list form:
Detach collection using TFS Admin Console
Backup collection database using SSMS, e.g. Tfs_YourCollection
Restore collection database on new server using SSMS
Install TFS
Configure app tier, skip creation of new DefaultCollection
Attach collection in the TFS Admin Console, might take some time depending on your collection size.
You can do 4+5 before 3.
Note: Changing domain can add complexity. SharePoint and Reporting sites are not migrated!

Upgrade to TFS 2015.3 successful, but portal unavailable

Today we have installed update 3 to our existing TFS 2015.2 server. The offline installation ran for about an hour and completed succesfully. However when trying to reach the portal site, nothing shows up (well a 404 page shows up actually).
When opening the Team Foundation Server Administration Console, it correctly displays the expected product version: 14.102.25423.0 (Tfs2015.Update3). However when I click on 'Application Tier', it displays the text:
This feature has been installed but needs to be configured. Click on
Configure Installed Features to begin initial configuration.
This same text is shown on many other administrative pages. Is this the cause of the portal missing? When I configure these features again, will it not erase our current team projects, history, build definitions and work items?
Are there any better ways to troubleshoot why the portal is missing?
Thanks in advance for any guidance.
Yes, you are right. After the upgrade, the configuration is needed to make sure the normal operation of TFS server. It will not erase your current team projects, history, build definitions and work items. There are just some settings will not effect your Database. Certainly, it's also important to keep good backup habits. After all, we didn't have a foolproof thing in the world.
After you upgrade TFS to 2015, each team project may need to be
configured to use some of the new features in TFS 2015. You don't have
to do this immediately, but those features aren't available in that
team project until they're configured. Depending on the team project,
you'll use some combination of the Configure Features wizard that
appears on the Work page and some manual configuration.
Source Link: Upgrade your deployment to the latest version of TFS
For your situation, there maybe some other error cause it. However, still suggest you to finish the configuration first. If it's still not work, then you can try below ways to narrow down the issue:
Check the Event View in the server to see whether there are some
related info
Check the configuration logs (Team Foundation Server Administration
Console-Logs or browser the folder in the server
C:\ProgramData\Microsoft\Team Foundation\Server Configuration\Logs)

Backing up TFS manually because TFS/Sharepoint Integration is hosed

After an ill-advised DCPROMO on our TFS server, and subsequent demotion, TFS continues to work but the SharePoint integration is totally hosed. SharePoint app pool refuses to run as a "Network Service" and so does SQLEXPRESS service. Unless there is some way to fix this, which I have not been able to find, I would like to totally re-install Windows Server 08 and TFS on our server. However, while trying to create a backup plan, I received an error relating to the fact that TFS cannot access MS SQL because of permissions issues. I would like to reliably and manually back up all TFS source control/history (I'm not worried about SP stuff at all, we haven't used it yet) and then restore it after I've re-installed stuff. Is this possible?
If you haven't really used ssrs/sharepoint etc you should be able to fairly easily detach any project collections and just migrate their databases to the new server. Each project collection only has one database normally named Tfs_{CollectionName}. The move the database to the new server with TFS already installed on it, restore the databases and attach them in the management console. http://msdn.microsoft.com/en-us/library/dd936138.aspx
Otherwise the recent versions of the TFS Server Power Tools have added a backup tab to the TFS management console which should be able to run you through making a backup. http://blog.hinshelwood.com/creating-a-backup-in-team-foundation-server-2010-using-the-power-tools/

How to change Data Tier(Sql Instance) in TFS

I have just installed TFS Server 2010 but during installation I selected SqlExpress as my data tier. Both my TFS application server and database exists on the same box. I also have full enterprise Sql Server edition on the samebox and now want to use the same rather than SqlExpress.
In TFS administration console, I found no way to change my data tier. I haven't created any project as such on TFS so there is no data to migrate. I just want to use my default instance now.
How to go about this ?
FROM https://msdn.microsoft.com/en-us/library/ms404869(v=vs.120).aspx
In order to restore the TFS databases using the restore tool, you must install but not configure TFS on the new data-tier server, and then use the restore function in the Scheduled Backups node.
Install TFS and cancel the setup TFS setup window once it opens. Or in my case I used the Uninstall Application tier option in the TFS Admin Tool. I didn't know you could cancel the application tier install. The wizard kind of forces you into it. Then I had to rename\delete the configuration db and any others that were created in the install.
I had to do this today for a TFS 2018 and found the below article useful. May not fit everyone's scenario but sharing since this SO link came on top of search results.
Run
TfsRestore.exe
in the C:\Program Files\Microsoft Team Foundation Server 14.0\Tools
folder. It has a GUI.
https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2012/jj620932(v=vs.110)
At this early point, you might as well just uninstall and reinstall. That's probably the easiest method.

Does the TFS App have to live on its own dedicated server?

So, I'm currently in the process of moving a client from Surround SCM to TFS. For some reason unknown to me they have a really hard time setting up a dedicated IIS for the app tier of TFS. Now they already have both an IIS and a SQL server for their regular intranet/internet apps, so I thought why not sjust use the existing server?
So my question is: Would it be ok to install TFS App Tier on the existing IIS server or reside on its very own dedicated server?
TFS should live fairly happily with other IIS applications however you must have your Sharepoint instance configured to be equally happy with other services. TFS is not happy if installed on a domain controller, but provided IIS has all the pre-requisites, this is the only TFS AT on that server, no other sites in IIS are listening to port 8080 and you keep the TFS instance in it's own application pool then I think things should work out but I have never done it in that order. I've had additional applications running on the IIS instance set up for TFS when TFS was set up first - but not add a TFS instance to an existing production IIS instance.
That said, I would be very tempted to have TFS on it's own IIS instance. As the version control and work item tracking system is usually fairly critical to the life of a software development organization you want to make sure that this critical server is not affected by other applications in the organization. You want it to have the love and attention given to a production environment. Also - when you are getting started with installing TFS you can sometimes run into issues. Being able to wipe the box clean and start all over again ensuring you are following the installation instructions step by step is a handy fall back position (more true in the TFS 2005 days than now, but old habbits die hard).
Additionally, TFS comes with a license for SQL Server provided that SQL Server instance is only used for the TFS application.
Because of all this, I would rather have a TFS server running the Application Tier and Data Tier on the same server than have an AT on a share IIS box. I think I would even rather have the application tier running on a virtualized environment running on that shared box.

Resources