Migrate local TFS to Team Foundation Service - tfs

I am trying to migrate my local TFS server to http://tfs.visualstudio.com/. My goal is to preserve code history, work items and etc.
Does this feature exists and if it how to use it?

I've used the TFS Integration Platform to migrate between two TFS servers. The one issue you might run into is the check-in dates are reset to the day of the migration (basically what you are doing is checking in all of the code), but the original check-in date is recorded in the check-in comments.

Related

Configure a backup schedule for Git version control with VSTS

I found articles on GIT back up and restore but I did not find any on Microsoft TFS Scheduled backup for GIT version control.
This document describes on how TFS's traditional versioning can be scheduled for automatic back up. Configure a backup schedule and plan for Team Foundation Server
However, I did not find any link where I can read that "GIT repository is also included in schedule". I am not a TFS expert and I do not have access to TFS server to verify in person. So any help is appreciated.
The tutorial you are refer which is Scheduled Backups tool. It' a build-in tool on the Scheduled Backups page in the TFS Administration console.
It' the whole database back up not only referring to source control, but also work items, pull requests, builds, test plans or anything else that the service offers.
As a limitation, you need both an administrator for TFS and a member of the SQL Server System Administrators group.
And no need to to verify in person, it's under SQL server, when you want to use the backup, just restore the database.
If you are actually using the online VSTS . For now there is no build-in tool and got a uservoice:
Provide a backup service for Visual Studio Team Services
https://visualstudio.uservoice.com/forums/330519-visual-studio-team-services/suggestions/5339461-provide-a-backup-service-for-visual-studio-team-se
However if you just want a git repository(source code) back up, you could use some 3rd-party tool to achieve this:
We use the VSO Rest API to query our VSO account and get all the data
we need. Since in VSO you can only have one Team Project Collection,
we retrieve all the team projects of the default collection. Each of
these team projects can have multiple repositories that need to be
backed up. A folder is created for each team project and saved to a
location on disk that can be configured in the app.config. When the
team project folder is created, the task loops over each repository in
the team project and creates folders for each repository.
Source Link
You can also fork it on GitHub here. Certainly, you should also be able to use this for on-premise TFS also use the API, just need to change some part.
TFS is implemented the way to keep Git repositories in the SQL Server database, too. Thus, when you follow the instructions from the article you reference, the source code will also be included in the backup, no difference whether it is TFVC or Git.

Opshub Migration from TFS to VSTS not mapping users

So I've been trying to perform a migration (code only, no work items) of a medium sized project from an on-premises TFS2010 to VSTS using the OpsHub tool. My user is an administrator on both sides, and the migration runs and completes without tossing errors.
The problem is that it just doesn't do what it says it will. I spent a long time mapping the users from TFS to VSTS during the setup, but it completely ignored that mapping and assigned every single changeset to my VSTS account. The docs also say that it should preserve the original TFS check-in time in the comment of the new VSTS changeset, but it never does that to any of them -- the comments are just brought over exactly as they were.
It seems like there must be a setting set wrong in OpsHub to turn these features on, but I can't find any kind of options screen or anything in the tool. It looks like other users are able to successfully map the TFS users to the VSTS users and have it work like you would expect, but I can't make heads or tails of it.
Thanks for any help or advice on this.
If you are using the free version then this feature is not supported by it and same is mention on the visual studio gallery download page, only the commercial version of migration utility supports partial user impersonation, i.e. writing changes as per configured user mapping.

Working while TFS Migration

Is it possible for developers to work offline while TFS is migrated? Can they checkout the code before migration and check it in after migration is done?
Source is TFS Express and Target is TFS 2012.
Yes, the migration will carry over the workspaces as well as all files that are checked out prior to migration. Once the migration is done, when the users point to the new server TFS and VS will do some automatic rewiring because the databases have the same GUIDs. Also note that you will want to make sure that they don't want to interact with the old server while the migration is underway.

Are there local commits in TFS?

Does TFS support local commits?
In other words: Can I
modify the code,
make a local commit (without sharing these changes with others),
test my modifications and
if my changes didn't break anything, do a global commit (thereafter my changes are available to other developers)
in TFS 2012?
If it doesn't, are there any workarounds, which allow this functionality?
No it doesn't support this, however it does have a couple of alternatives you can use instead.
1) Branches - All developers work on their own branch then merge to trunk/main when they're happy with their changes.
2) Shelveset - developers shelve any change they don't want to commit yet. This lets you undo your change, or pass it to another developer on the team without losing the change or checking into the main branch
3) Gated Checkins + Unit/Automated tests. Any time a developer checks in, TFS Automatically shelves the changes and runs the tfs build + any associated tests (unit or automated). If everything succeeds then it is checked in. I don't believe this supports manual tests.
or a mix of all of the above.
TFS does not support this by itself.
However! Microsoft released Git integration with TFS. Brian Harry blogged about this: Announcing Git Integration with TFS a couple of weeks ago.
Using this setup you can use Git for your local commits and then commit it to Team Foundation Server.
Not for the on premise version of TFS (yet), but as of January 2013 Microsoft's hosted Team Foundation Service has Git support, which obviously supports local commits.
http://tfs.visualstudio.com/en-us/news/2013-jan-30.aspx#git%20support

Get the history of TFS for expired trial version

I installed the Basic TFS trial version and now it got expired.
It is mandatory for me to get the history of TFS.
Where does it store the history? Does it store it in the SQL Express?
Is there any way to get the saved history?
Digging through the database is not trivial. You'd have to piece the history back together and de-deltify all the blogs.
It would be much easier just to get your TFS instance working again so that you can get the files out of it. TFS Express 2012 is now available, and has no such time restriction. It's free for up to 5 users. You may be able to upgrade your existing installation.
If you are still able to do a get, you could hook up git-tfs. Once you execute the git-tfs clone, you will be able to view the history using git. You can look at this tutorial for more information.
Did you consider trying querying the TFSWarehouse and use and automatic script to recreate history ?
Reference: Export TFS 2010 History to Excel or Text Document

Resources