Hello Everyone,
I am creating this article to address a very common issue related to the migration of spaces using Confluence Cloud Migration Assistant aka CCMA: Failed to read XYZ attachments.
You might have come across an issue when migrating spaces from Server/DC to Cloud using CCMA, where some attachments are failing to read and the migration of space fails.
Either the file has been deleted manually OR,
There was an error in removing the record of the attachment from Confluence.
Option 1:
Option 2:
Verify if there attachments that are causing the missing attachment issue but can’t be found in the pages. These are attachments that were deleted in confluence and the files are not physically found in the system.
-- -- Select attachments with 'DELETED' in CONTENT_STATUS column
SELECT CONTENTID FROM CONTENT INNER JOIN SPACES ON CONTENT.SPACEID = SPACES.SPACEID WHERE SPACES.SPACEKEY = 'YOUR_SPACE_KEY' AND CONTENTTYPE = 'ATTACHMENT' AND CONTENT_STATUS = 'DELETED'
If there are any results to the above query, run the below query to delete those missing attachments:
DELETE FROM MIG_ATTACHMENT WHERE ATTACHMENTID IN (SELECT CONTENTID FROM CONTENT INNER JOIN SPACES ON CONTENT.SPACEID = SPACES.SPACEID WHERE SPACES.SPACEKEY = 'YOUR_SPACE_KEY' AND CONTENTTYPE = 'ATTACHMENT' AND CONTENT_STATUS = 'DELETED'
You will need to delete attachments from previously failed migration. CCMA adds an entry in the MIG_ATTACHMENT table but sets the mediaId to NULL Those entries need to be deleted. Use the query below.
DELETE FROM MIG_ATTACHMENT WHERE mediaId IS NULL and cloudId = 'XXXXX’
If still, you run into the same issues, raise a support ticket with the Migrations team from https://support.atlassian.com
Option 3:
Saif
Enterprise Migration Engineer
Atlassian
Bengaluru
1 accepted answer
6 comments