Uploaded image for project: 'Migration Platform'
  1. Migration Platform
  2. MIG-33

Attachments are missing after Confluence migration to the cloud, error message "Attachment File Not Found"

    XMLWordPrintable

    Details

    • Support reference count:
      72
    • Symptom Severity:
      Severity 3 - Minor
    • UIS:
      1

      Description

      Issue Summary

      Attachments are lost when migrating using the CMAC from server to cloud.

      Environment

      Confluence Cloud

      Steps to Reproduce

      1. Set up Confluence Server (5.10 to latest) with a production (i.e. non-H2) database
      2. Set up a Space, create a page and attach multiple images to the page
      3. Install the latest Cloud Migration Assistant for Confluence)
      4. Create and run a new plan to migrate the new space, and no users
      5. Wait for the plan to be successfully completed
      6. Review the imported data in the cloud

      Expected Results

      All images appear correctly

      Actual Results

      Attachments are broken.

      Images do not display. Attachments may give an error with

      `Attachment File Not Found`
      
      `The attachment you were trying to download could not be found in the attachment file store. Either the file has been deleted manually or there was an error in removing the record of the attachment from Confluence.`
      
      `If this attachment is no longer required you can delete it from Confluence on the attachments page. Otherwise, you will need to attach a new copy.`
      
      `<< Back to attachments page`
      

      The below exception is thrown in the log file:

         message: Requested attachments not found in Filestore, so serving it locally. attachmentId: xxxxxxxx 
      

      Notes

      The cases reported, affected only space migration that was done using the Confluence Migration Assist for Cloud app, if we use the "Import a Confluence Space" feature from the Adminstration section, the issue it is not reproducible.

      If all the attachments are missing in a space, it is likely a different issue such as the export from an older, unsupported version of Confluence.

      On Confluence Cloud the attachments that are missing can be identified with as having no propertyname = 'FILESTORE_ID' in the contentproperties table, but having other propertyname data such as FILESIZE.

      One notable cause we've discovered is related to this issue

      which has been fixed in Confluence 6.15.3 and above. If the attachments are attached to a page, and the page has drafts and is deleted, then the attachments are not necessarily deleted if they are referenced in the draft. If those attachments are then referenced on another page in another space then they won't migrate.

      Workaround

      1. Clear the MIG_ATTACHMENT table prior to remigrating any spaces
      2. Delete and re-import the effected space.

      Notes for Support Engineers

      If a customer reports this case, please provide for the developers

      • A full Confluence Support Zip
      • The ... > Storage Format of a page from Confluence Server and Confluence Cloud
      • The URL of the Page in Confluence Server and in Confluence Cloud
      • From Confluence Server the output of
        Confluence Server
        select * from mig_attachments;
        
        select * from mig_cloud_site;
        
        select content.*, contentproperties.*, spaces.*, mig_attachment.*
        from public.content
        join public.contentproperties on content.contentid = contentproperties.contentid
        join public.spaces on content.spaceid = spaces.spaceid
        left outer join public.mig_attachment on content.contentid = mig_attachment.attachmentid
        where content.contenttype = 'ATTACHMENT' and content.prevver is null
        order by content.contentid desc;
        
        select mig_step.planid, mig_step.starttime, mig_task.executionstatus, mig_step.steptype, mig_step.stepconfig, mig_task.spacekey from mig_step left join mig_task on mig_task.id = mig_step.taskid where steptype='CONFLUENCE_IMPORT';
        
      • From Confluence Cloud the output of
        Confluence Cloud
        select content.*, contentproperties.*, spaces.*
        from content
        join contentproperties on content.contentid = contentproperties.contentid
        join public.spaces on content.spaceid = spaces.spaceid
        where content.contenttype = 'ATTACHMENT' and content.prevver is null
        order by content.contentid desc;
        

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bwalker2 Byron Walker
              Reporter:
              rscripcaru Ramona Scripcaru
              Votes:
              12 Vote for this issue
              Watchers:
              35 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: