Documentation for JIRA 4.1. Documentation for other versions of JIRA is available too.

This page describes how to restore JIRA data from a backup. This is the second step in either upgrading your server to a new JIRA revision, or splitting your JIRA instance across multiple servers.

If you wish restore a single project from your backup into an existing JIRA instance, refer to these instructions on restoring a project from backup instead.

When restoring data, all data in the existing JIRA database is deleted, including all user accounts. Before you begin, make sure you have the password to a login in the backup file that has the 'JIRA System Administrator' global permission.

バックアップからの JIRA の復元は、次の 3 段階のプロセスからなっています。

  1. (Optional) Disable email sending/receiving
  2. データベースへの XML データの復元
  3. (Optional) Restore the attachments to the attachments directory (if attachments were backed up)

1. Disabling email sending/receiving

If you are restoring production data into a test JIRA instance for experimentation purposes, you probably want to disable JIRA's email interaction features before you begin:

  • Disable email notifications — if JIRA is configured to send emails about changes to issues, and you want to make test modifications to the copy, you should start JIRA with the -Datlassian.mail.senddisabled=true flag.
  • Disable POP/IMAP email polling — if JIRA is configured to poll a mailbox (to create issues from mails), you will likely want to disable this polling on your test installation. This is done by setting the -Datlassian.mail.fetchdisabled=true flag.

Exactly how to set these flags is dependent on your particular application server, but for JIRA Standalone (i.e. Tomcat), it is done by setting the JAVA_OPTS environment variable before starting JIRA:

set JAVA_OPTS="-Datlassian.mail.senddisabled=true -Datlassian.mail.fetchdisabled=true"
cd bin
startup.bat

You could also try un-commenting the JAVA_OPTS="-Datlassian.mail.senddisabled=true -Datlassian.mail.fetchdisabled=true line from your /bin/setenv.sh file and then running startup.

2. Restoring XML data

Note: these instructions assume that you are restoring an XML backup. If you used native database tools to create your backup, the restore process will also be tool-specific so these instructions do not apply to you.

  1. Log in as a user with the 'JIRA System Administrators' global permission.
  2. Bring up the administration page by clicking either the 'Administration' link on the top bar or the title of the Administration box on the dashboard.
  3. Under the 'Import & Export' sub-menu in the left-hand navigation column, click the 'Restore Data from XML' link. This will display the 'Restore data from Backup page:

    Before continuing — If you see the following message at the top of the page,

    Changing the attachment, index, backup or restore settings is not allowed for security reasons. You must edit jira-application.properties and explicitly set 'jira.paths.set.allowed=true'. Restart JIRA and then the path settings will be able to be changed.

    then you must first configure your JIRA installation to permit modification to its file path settings, or you will not be able to restore XML data to JIRA.

    To configure your JIRA installation to permit modification to its file path settings,

    1. Follow the procedure for Enabling Modification to JIRA's File Path Settings, which requires JIRA to be shut down and restarted.
    2. Restart this particular procedure from step 1 (above).
  4. In the 'File name' field, fill in the full path to the ZIP or XML backup file generated by JIRA.
  5. Specify the directory that will hold the search index for this JIRA data, by either selecting 'Use Default Directory' (i.e. caches/indexes sub-directory in the JIRA home directory) or specifying your own location in 'Specify Custom Directory'. This directory should only contain JIRA index data.

    The contents of the index directory may be deleted by the restore process.

    If you are running more than one JIRA instance on the same server, ensure that each instance uses a different index path.

    If you change your index directory, please ensure that the index path is given appropriate security, as described in Security Overview.

  6. Click the 'Restore' button, and wait while your JIRA data is restored.
  7. JIRA will come back, informing you that you have been logged out. This is done because all the users from the previous JIRA instance have been deleted and replaced with users from the JIRA export file.

    If you changed the index path directory (above), this path will automatically be reflected in JIRA's search index directory settings.

    If you do not need to change any more directory path settings in JIRA, then it is strongly recommended that you follow the procedure for Securing JIRA's File Path Settings. This will help minimise the risk of your JIRA installation being compromised by security-related attacks.

3. Restoring attachments

If you created a backup of the attachments directory, you will need to restore the backup into a directory where JIRA can access it. The process of restoring the attachments backup depends on the way it was created. Usually you can use the same tool to restore the backup as the one that was used to create it (see Backing up attachments). Note: When you restore your attachments, ensure that the file permissions are correct.

If you are restoring the attachments into a different location (i.e. a different directory path) from where they were previously located (e.g. this will be the case when moving servers), please follow the instructions provided in Configuring attachments to change the location of the attachments directory so that JIRA can find the restored attachments.