Fixing broken attachments after restoring a backup to another Cloud Instance

Platform Notice: Cloud and Data Center - This article applies equally to both cloud 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

Summary

Documentation guides fixing broken attachments in a team-managed project converted from a company-managed project after restoring cloud backup from another instance.

Solution

Scenario

  1. Create a cloud site with Company-Managed Project

  2. Follow the Create-a-backup-for-Jira-Cloud documentation to create a backup of the cloud instance. The backup file will look like below:

    1 2 3 4 5 6 7 JIRA-backup-20230523 ├── activeobjects.xml ├── entities.xml ├── data │ ├── attachments │ └── avatars └── logos
  3. Split the backup into two: media (attachments, project avatars, and logos) & database backup (entities.xml and activeobjects.xml files)

    1 2 3 4 5 6 7 8 9 data-backup ├── activeobjects.xml └── entities.xml media-only ├── data │ ├── attachments │ └── avatars └── logos
  4. Compress the above two folders

  5. Restore data-backup.zip followed by media-only.zip to the new destination cloud site by following the article Import a backup file

  6. Before converting the project to a team-managed one, it's crucial to ensure that attachments load properly on the cloud. If any issues are identified after the conversion, follow the workaround below without any delay.

Fix Broken attachment post-cloud backup restoration

  1. Reach out to the Atlassian Support team to inquire about the status of the attachment on the Cloud.

  2. Check if the media store ID exists on the destination cloud site for the migrated project (Internal query for Atlassian only).

    1 2 3 4 5 6 SELECT ji.issuenum, att.filename, ma.media_store_id FROM jiraissue ji JOIN project pro ON ji.project = pro.id         JOIN fileattachment att ON ji.id = att.issueid LEFT JOIN media_store_attachments ma ON ma.attachment = att.id WHERE pro.pkey = 'PRJ' AND issuenum IN IN ( '123' )
  3. Using the above queries support team can confirm whether the media store ID is present.

  4. If there is no media store ID then follow the steps below to restore media-only.zip to the cloud again.

    1. First, Remove all other project folders from media-only.zip and keep only the problematic one

      1 2 3 4 5 6 media-only1 └── data └── attachments └──PRJ └──10000 └──PRJ-123
    2. Go to the destination cloud site

    3. Choose Settings > System

    4. Under IMPORT AND EXPORT, select Import Jira Cloud

    5. Click on Media Only and import the above-mentioned zip file

  5. Verify all images of imported projects are loading

Updated on April 17, 2025

Still need help?

The Atlassian Community is here for you.