Background: In the virtual machine installed TFS, later found that the C disk space is too small, run the card, ready to reconfigure a virtual machine as a TFS server. Install the same version of TFS, the database (at least the same as the original version, or a later version, or the database is not attached).
1. Make sure all code is checked in
2. In the TFS Management Console, detach the project collection that you want to migrate. Next step, then.
3, in SQL Server right-click to separate the database of the project collection, the general default TFS_ your project
4. In the database installation directory, locate the detached database file (C:\Program Files\Microsoft SQL Server\mssql11. Mssqlserver\mssql\data), to the new virtual machine. Or put it in the installation directory of the database.
5. Attaching a database in SQL Server
6. In the TFS Management Console, attach the collection. Type the database instance name and click List available databases. Next step, verify the Attach.
7. Click Team in VS, connect TFS, add a new TFS name or URL. Connect to the newly attached project collection.
8. On the right side of VS, click Source Control. I'm suggesting here that there is no workspace to create a workspace. Re-create the workspace map to a new local folder. Wait for the update to complete
9. Open the project in a new folder. Complete
tfs2012 migration, use only source code control