Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Failed to read (x) attachments while migrating from Server to Cloud

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.

Very common reasons why attachments cannot be found in server/DC:

  • Either the file has been deleted manually OR,

  • There was an error in removing the record of the attachment from Confluence.

 

Here are some of the steps you should follow after a failed migration because of missing attachments:

Option 1:

  • You can follow this article to resolve missing attachments before doing another migration.
  • It may happen that there are no results of the script following the above step, in that case, move to option 2.

 

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:

  • If none of the above options are helpful then, reach out to us raising a ticket on https://support.atlassian.com, we can help you with either deleting the bad entries or provide a dark feature to be enabled on the Confluence Server to skip those entries during the migration.

6 comments

Is there a similar procedure for Jira migration to Cloud?

Like Saif likes this
Saif Atlassian Team Apr 14, 2021

Hi @Rodolfo Romero ,

Regarding attachments failure with the plugin Jira Cloud Migration Assistant, it could be any reason and cannot be concluded without checking logs

For a detailed investigation, I would recommend creating a ticket with us from https://support.atlassian.com and we will surely help you solve the issue. Make sure you provide us the logs generated by the plugin and the support zip filesmile

Thanks,

Saif

Like SriKumar P likes this
SriKumar P Atlassian Team Apr 26, 2021

Good Article @Saif , It really helps customers to self serve themselves. 

 

Thank you,
- Sri 

We had 8 attachments when were cloud migration assistent failed. We tried to just delete the migration media-id's but that did not resolve the purpose. We checked this attachements in the pages and these had been deleted but somehow the contents where just there, but unreadable. Then we decided to just delete this 8 rows and that worked well.

 

IMPORTANT: DO NOT JUST COPY & PASTE THIS!

-- check attachmentid from media that was null and delete
select attachmentid from MIG_ATTACHMENT where mediaid is null
=> ie. you get 73105453, 73105417

-- check where the attachements are linked to
SELECT *
FROM CONTENT INNER JOIN SPACES ON CONTENT.SPACEID = SPACES.SPACEID
WHERE CONTENTTYPE = 'ATTACHMENT'
and contentid in (73105453, 73105417)

-- delete attachements
delete from contentproperties where contentid in (73105453, 73105417)
delete from imagedetails where attachmentid in (73105453, 73105417)
delete from content where contentid in (73105453, 73105417)

-- delete migration
delete from MIG_ATTACHMENT where mediaid is null

Like # people like this

Thank you @Frank Szilinski 

I was in the same situation with about 100 attachments missing overall in several spaces. Atlassians python script did not help. From the filenames I could see that most of the missing files date back to the year 2013 and earlier and that these are just orphans from long before deletes pages. Removing the attachments in the databased worked great and I was able to migrate alle spaces. 

Like Saif likes this
Saif Atlassian Team Jun 06, 2021

Hi @Frank Szilinski  and @Enrico Keil

First of all thanks for checking this community article.

You are right indeed, and I have mentioned this part in the article as well that most of the time those missing attachment errors are because of some deleted/stale entries from the past which still exist in the database. Basically, the attachment is physically deleted but the reference is still there. In such cases, you can try deleting those entries from the database as already done by you or the best-recommended approach would be to reach out to us by raising a ticket from https://support.atlassian.com, we can either help you out with deleting the stale entries or provide you a dark feature that can be enabled on Server to skip those deleted/missing entries of attachments during migration.

Thanks,

Saif | Atlassian

Comment

Log in or Sign up to comment
TAGS
Community showcase
Published in Atlassian Cloud Migration

Cloud migration resources roundup: May 2021

...est practices.   And don’t forget about the tried and true! Cloud Migration Center - central hub for all things Atlassian Migration Program. Includes links to our full resources page, s...

577 views 2 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you