Transfer TFS 2012 to another machine - tfs

Now we plan to move our running Tfs server to another machine in data center.
Running tfs server specifications:
1.Having several tiers: two app tiers and two data tiers
Data center tfs server specifications:
1.Single box topology: the data base and the tfs server in the same virtual machine
We have done the following steps to do backup:
Run tfsbackup.exe (C:\Program Files\Microsoft Team Foundation Server 11.0\Tools) to backup the tfs from running tfs
Backup all data bases including the report servers (the data bases are selected default by tfsbackup.exe tool)
Backup the encryption key for reporting services (followed steps in here)
After backup, we do the following to restore the tfs:
Log to data center tfs server as tfs service account (the tfs service account should be in local administrator group)
Run the TfsRestore.exe (C:\Program Files\Microsoft Team Foundation Server 11.0\Tools) to restore data base backup
After restore, open the tfs console to attach the collection from the restored data base
Issue:
When we try to attach the collection, we are blocked at the step to list the available data base: the restored data base can't be listed out.
Could anyone give some suggestion?
Thank you very much.

After some investigation, we found out the way to store the tfs is wrong.
Actually we are doing tfs transfer. So we should do the following steps to do tfs transfer and it works:
Logon tfs server in data center as tfs service account, and the tfs service account should be in local administrator group
Open tfs console and remove tfs feature : remove the current installed tfs instance
Manually delete all tfs related data bases in data base server
Be sure the related tfs service is running including www service
Run the TfsRestore.exe (C:\Program Files\Microsoft Team Foundation Server 11.0\Tools) to restore data base backup
Run TFS installer and follow the Application-Tier Only wizard to do tfs transfer configuration
At the data base step, click list available data base to list the restored data base
Restart the tfs server
Check the tfs configuration in the tfs console and update some links
10.
Thanks.

Related

Visual studio tfs multiple server add issue

I have TFS server connected to visual studio. And
I have restore it to another tfs server differnet name. Now i need add new server to visual studio. When i try to add it getting server with same id already exists.
You need to change the TFS or Azure DevOps Server's ID or GUID of the new instance. You can do that by using the TFSConfig command line.
TfsConfig changeServerID /sqlInstance:<serverName> /databaseName:<configurationDatabaseName>
[/projectCollectionsOnly] [/configDBOnly] [/collectionName]
Not sure your detail process of restoring operation. However according to your description, guess you may have two same server ID(applicationID)
You could find your old Team Foundation Server GUID Info in below location:
C:\Program Files\Microsoft Team Foundation Server 1x.0\Application Tier\Web Services\web.config
There should be a value like
Then you could compare the GUID of two servers old and new TFS server, change one of them and re-register db. You may need to restart sever, tfs service.
More details about it, please take a look at this blog: How to find Team Foundation Server(TFS) GUID Info
As how to change server ID, just as Niel mentioned, you could use TFSConfig command:
TFSConfig ChangeServerID /SQLInstance:server_db /DatabaseName:TFS_Configuration
Note: After you use the changeServerID command, you must direct clients to create a connection to the changed server before it can be used.

How to deploy TFS aggregator in TFS 2018

I'm not sure that TFS-aggregator will work in Tfs2018.Update1.RC1
But as per the below image, it should work(I hope)
I'm trying to do some POC by creating a rule using TFS aggregator
All works fine when I tested my rules using TFSAggregator2.ConsoleApp.exe
Now I want to deploy this rule to my original TFS (which will automatically trigger for every save on the WIT)
I've followed the instruction from here
As per that the Step 5 is,
Copy TFSAggregator2.ServerPlugin.dll, TFSAggregator2.Core.dll and
TFSAggregator2.ServerPlugin.policies to the plugin location on the
Application Tier of your TFS Servers:
The plugin folder is usually at this path for TFS 2017: C:\Program
Files\Microsoft Team Foundation Server 15.0\Application Tier\Web
Services\bin\Plugins; You must copy the exact same files on all TFS
Application Tier servers. TFS detects automatically that a file was
copied in and will load it in.
You can verify if assembly version matches TFS version using this
Powershell code
My Problem
I couldn't able to find the TFSAggregator2.ServerPlugin.dll, TFSAggregator2.Core.dll in my current directory which looks like this
The two dlls were already in the destination folder!
So I just copy and paste my TFSAggregator2.ServerPlugin.policies from C:\Program Files\TFS Aggregator\samples to C:\Program Files\Microsoft Team Foundation Server 2018\Application Tier\Web Services\bin\Plugins
I thought this will work but it's not working
Solutions so far which I tried
Restarted the tfsjobagent net stop tfsjobagent , net start tfsjobagent

team foundation server 2012 restore

I am trying to restore a Team Foundation Server database to another server.
The Original server was a Team Foundation server express 2012 install.
Steps so far
Created backup of all the databases using SQL management studio
i.e. TFS_defaultCollection,TFS_Configuration, Tfs_Company1, TFS_Company2.
Installed TFS Express 2012 on another server
Restored all the SQL Server database's to the new server
I get an error the SQL instance is missing.
Is there any way to restore the TFS databases to the new server.
or
is there any way to extract the project data from the databases.
Make sure you have created the SQL instance in SQL server.
Based on your description your backup should be executed manually. So,to restore data for Team Foundation to a different server or instance, you must complete the procedures that your deployment topology requires the sequence mentioned in below link:
https://www.visualstudio.com/en-us/docs/setup-admin/tfs/admin/backup/restore-data-different-instance#back-up-data
Recommend you follow the steps in this link provided by Daniel to backup and restore the database from TFS Administrtion Console, it's more convenient than manually backup.

How do I install prerequisites for TeamCity to connect to Team Foundation Server Version Control?

I've installed the prerequisite (Team Explorer 2013) to the best of my knowledge, but when I try to set up a VCS root to connect to our TFS Version Control server, I continue to get this error message:
"No TFS assemblies were found on the system. Please make sure you have
Microsoft Team Explorer installed. Supported versions: 2015 2013 2012
2010 2008 2005"
The Team Explorer I downloaded from Microsoft just seemed to be a plugin for Visual Studio, which doesn't make much sense as a server-side component. Anyway, I configured a connection to our TFS box within Team Explorer/Visual Studio on my TeamCity server.
So I have two questions that seem to be undocumented by JetBrains:
What does it mean to set up and configure Team Explorer? How can I validate that I have set up and configured Team Explorer on my TeamCity server correctly?
How does TeamCity know how to find the Team Explorer assemblies? Is there some sort of configuration I am supposed to do? Where is this documented?
I guess I'm looking for a true step-by-step set of instructions that make no assumptions about my understanding of TFS or Team Explorer, or any assumptions about what I may have already installed on my TeamCity box.
I've read the two articles on the JetBrains site regarding how to set this up, and they don't cover actually installing and configuring the prerequisites or configuring TeamCity to discover the Team Explorer assemblies it needs.
Team Explorer is the client software that you use to access Visual Studio Team Foundation Server functionality from Visual Studio. You can simply launch Team Explorer on your TeamCity server to create a team project and check in a project, to validate whether it is installed correctly.
I couldn't find any documentation that mentioned how does TeamCity find Team Explorer assemblies. But, based on my understanding, there is no configuration needed to detect Team Explorer. Please make sure your TeamCity server is running under Windows.
If the issue that can't find Team Explorer persists, you can install VS Premium instead of Team Explorer.
Setting up Jetbrains TeamCity for CI with Team Foundation Server:
Install Jetbrains TeamCity
If you are planning on using IIS or TFS on the same server, configure Jetbrains TeamCity to run on a port other than 80 or 8080
Once TeamCity is up and running, you can begin configuring your TeamCity installation for CI Builds.
Log into TeamCity with your user name and password
Create a new TeamCity Project
Create a new build configuration
You will now see a series of build configuration settings that you will have to complete presented in a Wizard-style navigation view.
Enter General Settings
Enter VCS Settings
After entering VCS Settings, Create and attach new VCS Root
Enter the relevant information for your TFS instance
Create a Build Step using Visual Studio as your build runner. You can create as many build steps as you need and specify the order of the steps (similar to a TFS Build Workflow).
For setting up Continuous Integration builds, you will need to specify a Build Trigger. CI Builds will generally use a VCS Trigger that is triggered on each source control check-in.
If you need to pass any parameters to your build, you can configure these in your Build Parameters.
That is all! You can then either run your Builds manually by clicking on the Run button in TeamCity or simply verify that your builds are triggered by the next check-in into TFS.

Why does "tf history ." claim there is no working folder in my mapped TFS directory?

I am trying to modify my project so that on build it queries for the current TFS changeset for the local directory and uses that to form the build number (using http://florent.clairambault.fr/insert-svn-version-and-build-number-in-your-c-assemblyinfo-file as a reference).
Since we currently are not using team build or any continuous integration for this particular project at this time I plan to use:
tf history . /r /noprompt /stopafter:1 /version:W
However, when I test this command out using the visual studio command prompt in my project's directly (where I work from TFS) it claims:
There is no working folder mapping for xxxxxxxx
The folder is shown as mapped in my workspaces in Visual Studio's Source Control Explorer (shows as the local path), and when I edit my workspace.
Why is the command line utility claiming there is no working folder when it is?
You will see this error message if you are using Visual Studio 2012 (and the corresponding Team Explorer 2012 client) and you are using tf.exe from Team Explorer 2010.
TFS 2010 clients store their local workspace cache in a different location on-disk than TFS 2012 clients. Thus, if you are to create a workspace with a TFS 2012 client, the TFS 2010 client cannot see that workspace data until it has connected to the server and populated its own local client cache.
It sounds like you're okay with using the TFS 2012 version of tf.exe, so I would make sure that your PATH contains an entry to that one first, and this should resolve your problem.
If you really wanted interoperability between the two versions, you would need to make sure to connect to your TFS server from both clients in order to make sure the workspace cache was complete for both. However make sure that you are using only server workspaces in this case, as TFS 2010 cannot connect to a TFS 2012 local workspace.

Resources