Import Command (TFSConfig)

You can use the Import command to import the data and projects from Visual Studio Team System 2008 Team Foundation Server into a new team project collection. To use this command, the databases that you import must be hosted on a server that is running SQL Server 2008 R2. If your databases are hosted on a server that is running SQL Server 2005, you must first upgrade them to a supported version of SQL Server before you can use the Import command. If you are aggregating multiple servers into a single deployment of TFS, 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. Each collection will contain all the projects and data from one server.

The Import command irrevocably changes the databases to function with the current version of TFS. After you run the Import command, you will no longer be able to use the databases with previous versions of TFS. 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 Team Projects in Team Foundation Server. If the command fails or you want to roll back the projects to an earlier version of TFS, 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 TFS. This command does not upgrade reports or team project portals that are associated with the projects and databases to TFS. The primary use for this command is to aggregate multiple deployments of previous versions of TFS into a current deployment of TFS. In most cases, you should first upgrade a deployment of TFS 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 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: Installing Team Foundation Server and Visual Studio ALM.

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.

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.

/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 TFS. 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 examples are for illustration only and are fictitious. No real association is intended or 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

Other Resources

Upgrading Team Foundation Server

Add a Team Project Portal

Add Reports to a Team Project