How to restore a single attachment to an issue

Usage FAQ

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

 

 

This guide will explain on how to restore a single attachment to an issue. Let say a user has accidentally deleted an important attachment from an issue, and you have a backup /data/attachments/ directory elsewhere. Since JIRA 4.2, there were Changes to Attachment Creation so that JIRA now saves the attachment using an attachment ID instead of the attachment file name.

Restoring a single attachment

In order to restore the single attachment you need the following:

  • A backup of /data/attachments/ directory 
  • The file type of the attachment that is accidentally deleted

To restore the attachment:

  1. Go to the backup /data/attachments/ directory
  2. Open the attachments directory down to the folder of the issue key (Eg. /data/attachments/DEMO/DEMO-1/)
  3. Compare the IDs in the directory with the existing ID from an attachment URL in the JIRA issue. For example the attachment ID below is 667983

    http://your-jira/secure/attachment/667983/EditProjectRoles.png

    (info) Since you have deleted the attachment, it won't exist in the issue. However, you can refer to this step to identify the missing attachment ID with the attachments in the backup directory.

  4. (Assume the deleted attachment ID is 667980) Copy the file 667980 to a temp directory 
  5. Rename the copied file 667980 to 667980.png (Assuming the attachment that was deleted is a PNG file type)
  6. Upload the file 667980.png to the issue referring to Attaching a File to an Issue

     

     

Last modified on Aug 26, 2013

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.