Recover deleted issues from Jira server backups

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問


目的

This article has been written to assist JIRA System Administrators recover JIRA issues that have been unintentionally deleted AND the content of your JIRA instance has a significant number of changes since your last backup. An example scenario is: John has deleted 10 issues from JIRA without telling anyone. Two weeks later John's manager discovers the missing issues. These issues contain information that is critical to the success of the project and must be recovered.

If the issue has only recently been deleted, your Database Administrator maybe able to recover the data using native Database Tools such as Oracle Flashback Technology. This procedure is not for recovering a JIRA instance from a simple backup. If you have a backup of an entire JIRA instance you would like to restore see: Restoring Data

Atlassian recommends removing all Users, Groups and Project roles from the Delete Issues permission to prevent accidental removal of issues. See Managing Project Permissions for guidance on removing the Delete Issue Permission. The permission can be added when the removal of an issue is required.

You will need:

  • An XML Backup or Database Dump of JIRA that contains the Issues that have been deleted.
  • A Server that can be used to install a temporary instance of JIRA.

This document is written as general guidance and covers unsupported Add-On's and unsupported procedures. Atlassian may be limited in the level of Support they can provide for Unsupported Add-On's and product features.

 (warning) The JSON Exporter Function is currently in BETA stage and therefore unsupported. The JIRA to JIRA Issue Copy Add-on is an Unsupported Add-on.

 (warning) Please note work logs may not be properly recovered using these methods if they were logged for a different date, ie. user logged work on the 30th for other days before, because CSV exports the date the worklog was created ( JRASERVER-64025 - Getting issue details... STATUS ), JSON and Jira to Jira Issue copy app does not bring work log data.

ソリューション

This process is written as general guidance for recovering issues that have been accidentally deleted. It has been written with JIRA 6.4.X in mind, however the procedures may work with other versions of JIRA.
  1. Generate a Recovery Instance
  2. 次のいずれかを実行します。
    1. Use JIRA to JIRA Issue Copy to move the issues
    2. Use JSON Issue Import to copy existing issues
    3. Using a CSV Export.
  3. Tidy Up Production Server

Generating a Recovery Instance

  1. Download a copy of JIRA that matches your current JIRA Version from the JIRA Download Archives
  2. Install a new Empty JIRA instance in a Temporary Server (You may like to review: Establishing Staging Server Environments for JIRA for some hints on this). If you are planning on using the JIRA to JIRA Issue copy tool, this sever must be accessiable to the Production server and visa versa.
    1. Use the Custom Install options.
    2. DO NOT use a similar directory for your JIRA Install or JIRA Home directories.
    3. DO NOT connect this JIRA instance to your Production Database.
    4. Use Different Port numbers.
  3. Log in to the temporary JIRA instance and record the Server ID. See: Finding your Server ID
  4. Recover the Backup JIRA instance that contains the JIRA issues into your Temporary Server either by using an XML Backup or from a Native Backup. (See: Automating JIRA Backups)
  5. Update the Server ID using the Steps in: Change the server ID for an instance of Jira server using the Server ID recorded previously.
  6. Login and confirm that your Temporary Server has the required Issues.


Copy the Issues From Temporary JIRA to Production Server

These methods may need to be evaluated for their effectiveness and appropriateness for the issue that needs to be recovered. If you need assistance with this, please contact Atlassian Support.

  • The CSV method may not be able to import Comments and Issue History
  • The JSON method may be limited in the Custom Fields that can be exported and is unsupported.
  • The JIRA to JIRA issue copy does not support Sub-Tasks, requires an Application Link to Production and is an Unsupported Add-on.


Using JIRA to JIRA Issue Copy

  1. Install the JIRA to JIRA Issue Copy Add-On on the Temporary Server.
  2. Install the JIRA to JIRA Issue Copy Add-On on the Production Server.
  3. Create an Application Link from the Production Server to the Temporary JIRA Server as per: Linking to Another Application
  4. From the Temporary Instance, locate the issue you wish to copy, and select Remote Copy from the More Actions dropdown of the affected issue.
    1. Sub-Tasks can not be copied, convert the Task to an Issue before moving the issue
    2. The Issue will have a new Issue Key when copied into the Server Environment.

Use JSON Issue Import/Export to Copy the issues

  1. Ensure your JIRA Production and Temporary Server are using JIRA Importer Plugin version 4.3 or Higher.
  2. Follow the Steps in How to enable JSON export in Jira server to Enable JSON Export (in Beta)
  3. Follow the guide in: Importing Data from JSON to import the generated files into JIRA.


Using the CSV Importer

  1. Search for the Issues in the Issue Browser from your Temporary Server
  2. Follow the guide in: Exporting Search Results to Microsoft Excel to export the search results. Only visible fields will be exported.
  3. エクスポートされた Excel を CSV に変換します。
  4. Import the CSV data, like here: Importing Data from CSV.


Tidy up the Production Server

You may need to tidy up the production server:

  1. Add Attachments to the issue that are missing.
  2. Set the Reporter and Assignee to correct values
  3. Switch Tasks to Sub-tasks
  4. Recover Comments from E-mail backups.
  5. Link Commits/Branches to new Issue ID's.


最終更新日 2021 年 11 月 25 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.