Installing TFS on a non-system drive - tfs

I am setting up a box that will host TFS plus a number of other lightweight services. The machine has a system drive (SSD) and two RAIDed HDDs. I want to ensure that the TFS data is stored on the RAID volume for disaster recovery.
How do I make TFS use the RAIDed volume? Is it as simple as specifying SQL server to be installed on RAID? Or is there more?

TFS stores it's data in SQL Server. So wherever SQL Server hosts it's data files (MDF/LDF) is where the TFS data will be located.
Note: You don't have to "install" SQL to your data drive, you just have to make sure it's configured to place the SQL Server data files there.
If your databases have already been created you can also move the existing data files using SSMS.

Related

How to run a backup of projects on TFS 2017

I am looking a way or strategies of backing up my projects on TFS2017.
I don't there is a tool to do full backup / incremental backup or differential backup.
I would appreciate any resource or help .
Thanks
How to run a backup of projects on TFS 2017
AFAIK, TFS does not support backup a single project or some of projects. There are too many dependencies in the database. It only supports backing up the entire project collection.
If you still want to backup some of projects instead of the entire project collection, you could try to back up this project collection first, then delete other projects from this project collection and create a new backup project collection containing only the projects you need.
You could use the Scheduled Backups Wizard to makes it easy to back up your databases, which are part of the Azure DevOps Server data tier and are stored in SQL Server:
Back up and restore databases
Besides, if you are working with a large deployment and want to protect against data loss while efficiently using limited storage resources, you can configure differential backups as well as full data backups. If you are using SQL Server AlwaysOn, you can take backups of your secondary database. You can also try using backup compression or splitting backups across multiple files.
Types of backups
And we could also manually back up data for Azure DevOps Server by using the tools that SQL Server provides

What is the best practise in using TFS database

When I am trying to Install TFS it is asking me to "Install new SQL server" or "Use the existing SQL server". If I have existing SQL server which is used by the Application ( all the application related tables ,SP..etc) and if I choose to select the "use the existing data base" while installing TFS. Will that effect in the performance of the application? Because application uses the same database as well Tiffs also uses the same database.
Wondering if some one can suggest me what is the best practice to use the same data base which is used by application or use the different database for TFS.
Yes, if you have two applications using the same database server you will likely have a performance impact, dependent on capacity/performance of the servers.
I would recommend that you instead create an account on http://tfs.visualstudio.com and use the hosted TFS. It's more secure, has backups, and is supported and managed by Microsoft for you. You get 5 users included over and above any MSDN users that you already have.
If you are intent on running your own server then TFS included a SQL Server standard license if you are running on a single server, and only use it for TFS. So I would install SQL Standard and then TFS 2017 and select Existing. If you get TFS to install its own SQL it will use Express...

Unable to check in after adding database files to TFS databases

Slight difficulty with Team Foundation Server 2008 databases (using Sql Server 2005).
Team System reported running out of disk space so I added another data file to each and every Team System database (on another fixed drive) to increase the disk space available. I did it as follows for each TFS database:
Add another file, type=Data, size etc = defaults, path to new drive.
Change the original data file to stop further expansion (Autogrowth=none).
Restart Sql Server.
That is the documented method for adding further space to a Sql Server 2005 database. However now I find I can check out files, but not check in. In Visual Studio, Source Control Explorer displays projects and can be expanded to show folders and files as normal, but When I rt-click on a checked-out file and select 'check in', nothing happens and the file remains checked out, and then Visual Studio has to be terminated using Task Manager.
There don't seem to be any related errors in the server Event Log.
What have I missed or done wrong?
You need to use the 'Database Mirroring' feature to add a database file for a mirrored database that has different drives and/or paths.
Firstly, check this MSDN article for the detailed steps on how to "Configure SQL Server Mirroring for the TFS Data-Tier Server": https://msdn.microsoft.com/en-us/library/aa980629(v=vs.90).aspx
Secondly, follow steps in this article about how to "Fail Over to a Mirrored Data-Tier Server if the Principal Server is Unavailable": https://msdn.microsoft.com/en-us/library/aa980528(v=vs.90).aspx
"clean the TFS cache", posted by TfsAgent, actually solved the problem. Nothing to do with adding extra database files after all - that was a coincidence.

Moving TFS database

Our TFS database was installed on the c: drive, but should have been installed on the f: drive (1 Tb drive). To move this do we simply need to unmount the databases, move MDF and LDF files to the new drive, and remount the databases?
Are there any gotchas that will bite us if we do the above?
Make sure you properly turn off the tfs services on all your TFS Application Tiers before detaching the databases using
tfsservicecontrol quiesce
From the Applicatier Tier server console.
Then after moving everything make sure you turn them back on using
tfsservicecontrol unquiesce
See also: http://msdn.microsoft.com/en-us/library/ff470382.aspx

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/

Resources