YouTrack Standalone 2017.1 Help

Import Issues from Another YouTrack Server

This page provides instructions for importing issues from one YouTrack server to another with the Python Client Library. Use these instructions to:

Before you begin, consider your options. Follow these instructions only when you want to migrate a limited number of projects or issues. If you want to migrate an entire database, use one of these options instead:

  • If you simply want to move a YouTrack Standalone installation from one server to another, you can configure your new YouTrack server to use a copy of your old database. For instructions, see Change Database Location.
  • If you want to move issues from one InCloud instance to another, send a support request. The YouTrack InCloud support team can migrate the database from your old InCloud instance to your new domain.

Permissions

The user account that you use to log in to the source YouTrack server requires permission to read issues and all their attributes including custom fields in the project to be imported. The user account that you use to log into the target YouTrack server requires permission to create and update a project, create users, read issue private fields, and update issue private fields. We recommend that you use an account with a System Admin role for both source and target servers.

Import Details

When you import issues from another YouTrack server, be aware of the following mechanics:

  • Issues are imported on a per-project basis. The source project is specified by its projectID. When issues are imported, all of the entities that are referenced in issue attributes are imported as well. This includes users (from issue fields like Reporter and Assignee) and sets of values for custom fields.
  • When a user is imported, the user account is assigned a randomly-generated password. When users log in to the target YouTrack server with credentials from the source server, they must use the Send password restore email link to reset their passwords.
  • Only custom fields that are used in the target project are imported from the source YouTrack server. To make sure that you import all of the data from the source server, check the project in the target server and verify that it contains the correct number and type of custom fields.

Import All Issues in a Project

The Python script lets you import all issues from a source project at once. The target project is created automatically.

To import all issues in a project from one YouTrack server to another:

  1. Download the latest version of YouTrack's Python Client Library and unzip it.
  2. Ensure that either Python or JPython is installed in your system.
  3. Execute the following command:
    python youtrack2youtrack.py source_url source_login source_password target_url target_login target_password projectId
    Specify values for the following parameters in the command:
    ParameterDescription
    source_urlThe URL of the source YouTrack server to import issues from.
    source_loginThe username of the account you use to log in to the source YouTrack server.
    source_passwordThe password of the account you use to log in to the source YouTrack server.
    target_urlThe URL of the target YouTrack server to import issues to.
    target_loginThe username of the account you use to log into the target YouTrack server.
    target_passwordThe password of the account you use to log in to the target YouTrack server.
    projectIdThe projectID of the project to import to the target YouTrack server.
  4. Check the target YouTrack server and verify that the issues are imported correctly.

Import Single Issues

In some situations, you might want to import issues one at a time. For example, when you want to migrate an issue from an internal YouTrack instance to your public tracker. The Python script used in this procedure imports a single issue from a source project to an existing project in another YouTrack server.

Follow these steps to import single issues from one YouTrack instance to another.

To import a single issue from one YouTrack instance to another:

  1. Download the latest version of YouTrack's Python Client Library and unzip it.
  2. Ensure that either Python or JPython is installed in your system.
  3. Execute the following command:
    python moveIssue.py src_url src_login src_password trg_url trg_login trg_password src_issueId trg_projectId
    Specify values for the following parameters in the command:
    ParameterDescription
    src_urlThe URL of the source YouTrack server to import issues from.
    src_loginThe username of the account you use to log in to the source YouTrack server.
    src_passwordThe password of the account you use to log in to the source YouTrack server.
    trg_urlThe URL of the target YouTrack server to import issues to.
    trg_loginThe username of the account you use to log into the target YouTrack server.
    trg_passwordThe password of the account you use to log in to the source YouTrack server.
    src_issueIdThe issueID for the issue that you want to import to the target YouTrack instance.
    trg_projectIdThe projectID of the project in the target YouTrack instance that you want to import the source issue to.
  4. Check the target YouTrack server and verify that the issue was imported correctly.
Last modified: 18 April 2017