Migrate attachments from legacy Jira server installation to Jira Datacenter
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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
Summary
After migrating Jira server installation to a clustered datacenter setup, the attachments are not visible or missing from the issue view or can't be located/downloaded using the rest API endpoints.
Environment
Jira clustered Data Center setup.
Diagnosis
In the atlassian-jira.log, the system throws exceptions and alerts from the attachment-related health check, announcing the failure to find one of the recent ticket's files.
1
2
3
4
5
6
7
2023-06-18 05:07:54,287+0000 HealthCheck:thread-2 WARN ServiceRunner [c.a.t.j.healthcheck.support.AttachmentHealthCheck] There was a RuntimeException when testing the attachment 10911
com.atlassian.jira.issue.attachment.NoAttachmentDataException: Attachment does not exist in filesystem /var/atlassian/application-data/shared-home/data/attachments/XX/10000/XX-456/12345
at com.atlassian.jira.issue.attachment.store.DefaultFileSystemAttachmentStore.getAttachmentData(DefaultFileSystemAttachmentStore.java:142)
at com.atlassian.jira.issue.attachment.store.DefaultFileSystemAttachmentStore.getAttachment(DefaultFileSystemAttachmentStore.java:124)
....
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Cause
In order to migrate a Jira server installation to a clustered Data Center installation, the old attachments need to be shared with all the cluster nodes by placing them in the Shared Home path
Solution
In general it is required to copy the old local home data to the shared home path , this issue will be fixed when the data folder from the server home directory is copied to the shared home directory.
1
cp -R /path/to/jira-local-home/data /mount/jira/sharedhome
Restart Jira service
Was this helpful?