Attachment not imported during backup restoration in Jira Data Center
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
After performing full backup restoration, none of the attachments are shown in issue pages even after verifying that the attachments are restored to right directory before the restoration started.
Diagnosis
Diagnostic Steps
- Verify that Restore System option is used to restore XML backup.
- Verify that the attachment from source instance is restored to <JIRA_HOME>/data/attachment directory before backup is imported.
For more information on how to find the <JIRA_HOME> folder, please refer to the KB article Find the location of the Jira home directory
Extract the XML backup and run the following grep command to verify whether there are any attachment entries in entities.xml:
megatron:~/Downloads/XMLBackup$ grep -i "fileattachment" entities.xml megatron:~/Downloads/XMLBackup/$
Cause
From the grep command, we can see that there are no attachment related entries in the entities.xml. This shows that when the backup was generated, attachment data was either removed or not exported.
Resolution
To fix this problem, please generate a new backup from the source JIRA instance and verify using the same grep command from diagnostic steps to verify that the attachment related entries are available inentities.xml. Once this has been verified, please use the backup to restore it in target JIRA instance.