Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Confluence Attachment Hierarchy help

Kristin Lyons
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 18, 2019

We have migrated Confluence spaces from one instance to another but the attachments did not migrate (they were in the database, I have since pulled out the attachments from the database).  Is there a tool of any sort to help me easily find the attachments for the spaces?  

I have these sites bookmarked:

https://confluence.atlassian.com/confkb/restoring-attachments-from-a-filesystem-backup-to-an-imported-space-951392066.html

https://confluence.atlassian.com/doc/hierarchical-file-system-attachment-storage-704578486.html 

However we have thousands of attachments.  Is there an easier way to find the attachment storage mapping, such as a program or calculator where I can just put in the necessary information (space id, content id) and it will give me the appropriate folder name/id?

1 answer

0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 21, 2019

Hello Kristin,

Thank you for contacting us about this. There's an article below that could help you with that. Have you seen this before?

Let me know if you have any trouble.

Regards,

Shannon

Kristin Lyons
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 21, 2019

Would this work if I were to dump all the attachments from the original Confluence instance into a random folder in the new Confluence instance?  Right now the missing attachments are not in the new Confluence's attachment folders at all.

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 29, 2019

Kristin,

Apologies for the delay; I was on holiday. Before I confirm, can you let me know the Confluence versions of the original site and the destination site? 

When you say that the attachments did not migrate, and that they were pulled out of the database, are you saying that you recovered the attachments from the database after migrating them, or that you had removed them from the database prior to migrating? What process exactly did you use to migrate the space from one to another? Was it a full space backup or select pages? 

Regards,

Shannon 

Deleted user October 29, 2019

The attachments were in the database during the migration (the migration included changing to a new database).  This was realized after the migration was complete.  I then went back into the original instance and pulled the attachments out of the database within Confluence's UI.  The process used to migrate the spaces was a full space export.

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 30, 2019

Hi Kristin,

Thank you for clarifying that. Could you share with me the version of the original and source instances of Confluence? With the article I sent you earlier, it won't fix your issue. 

Confluence versions 5.4 and earlier gave administrators the ability to store attachments in the database. However, in later versions, there's a task that is supposed to migrate those attachments into the filesystem. If you are migrating from 5.4 or earlier, then you can only migrate to the same Confluence version.

The problem is that when you import a space, the pageIDs change, so there's no way to add your attachments afterward. 

Your solution is to first fix the attachments in your source instance, so that they are stored in the local filesystem. See Attachment Storage Configuration for more details.

  1. If you are on 5.4 or earlier, you can then create a new space backup, and migrate to the same version of Confluence.
    • Note: Only Confluence versions 6.4 and later are supported at this time. We also had a pair of security vulnerabilities announced this past spring (see Confluence CVEs and common questions). If you are indeed on an older version, you need to upgrade as soon as you can to avoid your site being compromised.
  2. If you are on a version later than 5.4, once you correct the attachment storage configuration, you can create a new space backup and import according to Restoring a Space

Let me know if you have any trouble.

Regards,

Shannon

Kristin Lyons
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 30, 2019

Since the migration was already performed and live in production we cannot perform either of the above suggestions.  Thank you for your assistance, it seems we will just have to map out the attachment locations from the old instance to the new instance and manually migrate them.

Like Shannon S likes this
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 31, 2019

Kristin,

I'm sorry to hear that. Let us know if you have any other questions and we'll be happy to help.

Regards,

Shannon

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events