Here is the protocol that I applied to migrate our tfs 2013 to tfs 2015.
Important
- The protocol is only tested to migrate
- tfs 2013 to tfs 2015
- tfs 2015 to tfs 2017
- The protocol is only valid for TFS on premises
Protocol
Preparation
- Define a deadline for code freeze
- Checkin / shelve all ongoing developments before the deadline
- Finalize forward/reverse integration in case you have multiple branches
- Backup project collection database, suggested format :
Tfs_CollectionName_YYYYMMDD
The following sql script is quite handy. Don’t forget to replace CollectionName and the date in YYYYMMDD format. Please note
that \\server\backup\...
is a shared network path acessible by the machine that hosts target tfs server.
BACKUP DATABASE Tfs_CollectionName TO DISK = N'\\server\Backup\Tfs_CollectionName_YYYYMMDD.bak'
WITH NOFORMAT, NOINIT, NAME = N'Tfs_CollectionName-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10, COPY_ONLY
GO
Migration
- Stop the project collection
- Detach the project collection
- Backup again project collection database, suggested format :
Tfs_CollectionName_YYYYMMDD_Detached
- Restore the backups on target tfs database
- Using target tfs admin console, attach restored database
Verification
- Check changesets history (right click on a branch => view history)
- Check workitems (epics, features etc.)
- Check users and their permissions
- Check build definitions if you have any
- Check distributed build agents, if you have any
Bonus
- If you have developed custom plugins, mvcsmon can be of great help to debug these remotely