Import Command (TFSConfig)
You can use the Import command to import the data and projects from Visual Studio 2005 Team Foundation Server or Visual Studio Team System 2008 Team Foundation Server into a new team project collection in Visual Studio Team Foundation Server 2010. To use this command, the databases that you import must be hosted on a server that is running SQL Server 2008, and their names must not include the TFS_ prefix that Team Foundation Server 2010 uses. If your databases are hosted on a server that is running SQL Server 2005, you must first upgrade them to SQL Server 2008 before you can use the Import command. If you are aggregating multiple servers into a single deployment of Team Foundation Server 2010, you must run the Import command against each server separately. The projects from each server on which you run the Import command will be incorporated into a single team project collection. For example, if you run the Import command on two separate servers, you will create two team project collections on the server that is running Team Foundation Server 2010. Each collection will contain all the projects and data from one server.
The Import command irrevocably changes the databases to function with Team Foundation Server 2010. After you run the Import command, you will no longer be able to use the databases with previous versions of Team Foundation Server. After you import the databases, users of the projects and data that are contained in those databases must create a connection to the collection that contains the projects that they want to access before they can work in those projects. For more information, see Connect to and Access Team Projects in Team Foundation Server. If the command fails or you want to roll back the projects to an earlier version of Team Foundation Server, the only way to restore the projects to the earlier version is to restore the databases from a backup that was made before you used the Import command.
Important
Make sure that you back up all databases before you actually use the Import command.
The Import command is not intended to be a substitute or replacement for the upgrade wizard for Team Foundation Server 2010. This command does not upgrade reports or team project portals that are associated with the projects and databases to Team Foundation Server 2010. The primary use for this command is to aggregate multiple deployments of previous versions of Team Foundation Server into a deployment of Team Foundation Server 2010. In most cases, you should first upgrade a deployment of Team Foundation Server by using the upgrade wizard, and you should then move or split projects into collections after the upgrade is completed. This approach will upgrade reports along with the deployments and help preserve the functionality of reports and team project portals for the deployment. For more information, see Move a Team Project Collection and Split a Team Project Collection. For the most recent information about how to upgrade previous versions of Team Foundation Server, download the installation guide for Team Foundation. You can find the most recent version of this guide on the following page on the Microsoft Web site: Installation Guide for Team Foundation.
Required Permissions
To use the Import command, you must be a member of the Team Foundation Administrators group on the application-tier server for Team Foundation. You must also be a member of the sysadmin group in SQL Server on the data-tier server for Team Foundation. For more information, see Team Foundation Server Permissions.
Note
Even if you are logged on with administrative credentials, you must open an elevated Command Prompt to perform this function on a server that is running Windows Server 2008, Windows Vista, and Windows 7. To open an elevated Command Prompt, click Start, right-click Command Prompt, and then click Run as Administrator. For more information, see the Microsoft Web site.
TFSConfig Import /SQLInstance:ServerName /CollectionName:NameOfNewCollection /confirmed
Parameters
Argument |
Description |
---|---|
ServerName |
Specifies the name of the server that hosts the databases. If you use an instance other than the default instance, you must also specify its name in the following format: ServerName\InstanceName The name of the server and instance that is specified must be an actual computer name, IP address, or system name such as "localhost." The command will fail if you use a placeholder, such as "." or "(local)". |
NameOfNewCollection |
Specifies the name of the team project collection that you will create as part of importing the databases. If the name of the collection that you want to create contains spaces, you must enclose the name in quotation marks (for example, "My Collection"). |
Option |
Description |
---|---|
/SQLInstance:ServerName |
Specifies the server that hosts the databases that you want to import into a team project collection for Team Foundation Server 2010. |
/CollectionName:NameOfNewCollection |
Specifies the name of the collection that will host the imported databases. |
/confirmed |
Confirms that you have backed up all the databases before you run the command. |
Example
The following example shows how to import the databases in the Contoso1 deployment of Team Foundation Server. In this example, the databases are hosted on the 2008Projects instance on the server that is running SQL Server and that is named DataServer2 (DataServer2\2008Projects). The projects will all be imported into the team project collection that is named "Old Server."
Note
The example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious. No association with any real company, organization, product, domain name, e-mail address, logo, person, places, or events is intended or should be inferred.
TFSConfig Import /SQLInstance:DataServer2\2008Projects /CollectionName:"Old Server" /confirmed
See Also
Tasks
Create a Team Project Collection
Add a SharePoint Web Application to Your Deployment
Add a SharePoint Web Application to a Team Project Collection
Add a Report Server to Your Deployment
Add a Report Server to a Team Project Collection