Moving TFS database - tfs

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

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

Installing TFS on a non-system drive

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.

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/

What's a Backup and Recovery Process for Team Foundation Server 2010?

We have a new installation of TFS 2010 (on SQL Server 2008), and I'm planning the backup and recovery process.
It seems the configuration information and data is stored in the Tfs_Configuration and Tfs_DefaultCollection databases (and additional Tfs_[CollectionName] dbs if you have more than one collection). In a test setup, I tried backing up the two dbs, uninstalling TFS, then reinstalling (thinking I could then hook the databases up at some point in the install process). This is where I'm confused. I don't see an option or clear guidance on how this is suppose to work.
If you have backed up your TFS 2010 databases and lose your TFS server, you can restore it by restoring all of your TFS databases, reinstalling TFS, and selecting the Application Tier option of the installation wizard. Once you point the wizard at your database, it will recognize the Tfs_Configuration database from the previous installation and restore your previous configuration as well as your collections.
Download the TFS Power tools and use the backup tool (it's even got a nice GUI)!
There seems to be a MSDN section on this topic: http://msdn.microsoft.com/en-us/library/bb552295.aspx

TFS: Moving a Team Project from one server to another?

is there a (simple) way to move a single TeamProject from one server to another? Including source code, work items, documents, project site...
We don't want to move our server from one machine to another. Just a single project from server A to server B.
You have two options
You can use the TFS to TFS migration tool: Click Here. This doesn't include the WSS project site.
Or you can backup your TFS db and restore on a new TFS instance, then use the TFSDeleteProject.exe tool to remove the projects you don't want.
The latter option is the easiest, but will not merge the backed up projects with any existing projects on the target instance. Existing projects will be lost. WSS sites can also be moved in this manner as well. See How to: Back Up a Team Foundation Server
The TFS to TFS migration tool is obsolete. The features you are looking for is part of TFS Integration Platform.
Goto http://tfsintegration.codeplex.com/ for more info.
In TFS 2010 you can detach the Project Collection database using the TFS Admin Console and then re-attach it to another TFS Server.
http://msdn.microsoft.com/en-us/library/dd936138.aspx
If you want an entire Project Collection to be moved from one TFS server to another:
1) Detach the collection via Admin Console.
2) Backup the Tfs_SomethingCollection database using SSMS, then restore it to the other database server.
3) On the second TFS Admin Console, attach the project collection. It will show up as an available collection to attach just because it has been restored in the second sql server instance.
I did not migrate the Tfs_Configuration database. In my case I was not utilizing reporting services, build services, or sharepoint.
I hadn't installed the second TFS server and was wondering, what options to choose when installing, and if you should install it after or before restoring the migrated DB(it doesn't really matter): Install TFS on the second machine. If TFS and its database instance will be on seperate servers, then choose Advanced configuration and specify the name of the DB server instance. When you have an opportunity to create a DefaultCollection, then opt to skip that step. The install will create a new Tfs_Configuration DB on the new server. Then follow the above steps to migrate the collection DB to the new DB server instance and attach it.
Programmers will need to add the new server to Team Explorer, and hit Change Source Control... twice in a row for each solution. Make sure the local path mappings are correct, and then Bind each solution/project.

Resources