Day: November 29, 2017
With the multiples Team foundation server platforms 2015, 2017 etc., and the generalization of the VSTS platform, you have a lot of companies which want move from TFS 2015 to VSTS, without passing by 2017 step.
However, for this constraint you add another steps that is to restore your database on TFS2017, before go on VSTS.
This post will describe the steps related to this use case.
Here post about differences Between TFS and vsts link
Remark : Before final migration, you pass by DryRun step, this later permit you to check your state of migration.
Below steps about migration :
1. Dettach your collection on TFS 2015.
2. Backup your collection on your TFS 2015 (I suggest you to use administration console in order to backup and restore data layer).
3. Restore your collection on TFS 2017.
Remark : TfsMigrator tool ensure migrating from 2017 to VSTS, so it’s required to pass by this temporary step.
Download TFSMigrator tool from here link, Tfs Mgrator is console application, you have lot of command for each technical need, we begin always by validating your migration, next step is preparing and we finish by importing.
Remark : Preparing process execute always firstly validating process.
4. We run validating command
TfsMigrator validate /collection: http://yourServer/yourCollectionName
You have to correct all errors before run migration, if you have warning it’s not important, you can ignore.
For example if you have errors about maching between and group sid, I suggest you to run TFSSecurity (C:\Program Files\Microsoft Team Foundation Server 15.0\Tools).
TFSSecurity.exe /a+ Identity "397c326b-b97c-4510-8271-75aac13de7a9\\" Read sid:S-1-9-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-XXXXXXXXXX-0-0-0-0-3 ALLOW /collection:https://YourServer:8080/tfs/YourCollection
Run another times validate command until passe validating process.
After validating of your migration, for preparing of your migration run prepare command.
Below screen describing command.
tfsmigrator prepare /collection:http://yourServer/yourCollectionName /t enantDomainName:yourDomain.com /accountregion:WEU
- Enter your collection’s url
- Enter tenant domain name
Remark : With new version ensure that you have added accountregion:WEU.
Below you have set of generated and modified files, in previous sections.
Now we can view content of json file, and modify attributes values.
Foreach attributes we have set of actions to execute, in order to define value.
We have defined test as name of account name, with this name you can check your migration with this url : https://test-dryrun.visualstudio.com/.
We define flag DryRun, in order to significate that result if test version of migration.
We generate dacpac file in the root of TfsMigrator, so we indicate the path of dacpac file.
For generating of dacpac file corresponding you database, SqlPackage is defined tool for operation.
GO to this link C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin.
Just before execute SqlPackage for generate dacpac file, dettach collection
Below command associated, set values of server and database, ensure that we have target file in output :
SqlPackage.exe /sourceco nnectionstring:"Data Source=TourSrver;Initial Catalog=Yourdatabase;Integrated S ecurity=True" /targetFile:c:\DACPAC\Tfs_test.dacpac /action:extract /p:ExtractA llTableData=true /p:IgnoreUserLoginMappings=true /p:IgnorePermissions=true /p:St orage=Memory
After generating dacpac file , we copy this later into migration directory, under TfsMigrator.
Now we try to define storage accoutn url, for this need we follow steps below :
Download Microsoft Azure Storage Explorer, connect to your subscription.
Open Storage accounts under your subscription
Open Blob containers,
Right click and create specific container under BlocContainer.
Define access signature with Expiry time of unless 1 month.
Ensure that you have good expiry data, and all authorizations.
Click on create button.
Click on copy button in order to copy and paste this later on your json file as storage’s url into Location attribute.
Upload identity map file and dacpac file into azure explorer, by clicking on Upload button.
Below two files uploaded.
Ensure below that we have imported all files.
Now open command prompt and run import command in order to finalize migration.
tfsmigrator import /importFile:import.json
After running you have this screen.
You can also follow migration screen on board.