Confluence site export & attachments seperately

Mike Rolls January 6, 2022

If I generate a confluence server site export without including attachments can I then restore the export onto a new data center instance and simply copy the original attachments folder to the new server location & re-index?
Will the imported pages still retain the association to the referenced files?

Thanks
Mike

2 answers

1 accepted

0 votes
Answer accepted
Brant Schroeder
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 6, 2022

@Mike Rolls 

It sounds like you are looking to migrate your instance.  If that is the case and you have a large number of attachments you should look at migrating the DB and home directory.  https://confluence.atlassian.com/doc/migrating-confluence-between-servers-184150.html

As far as attachments go.  If you have a space backed up to XML without attachments you will have to do some steps to recover those.  My understanding is for the site backup still contains the same structure so moving the directory will work if the files are there before running the restore but you would want to test this.   For larger migrations, I would suggest following the steps above instead of using a site backup.  

Mike Rolls January 6, 2022

Hi Brant,
I agree migrating the DB & home dir would be preferable but the source & host instances are at different versions & the client's team are reluctant to upgrade the source instance to the target version or downgrade the target, migrate then upgrade.
Crazy situation which is why the site import seemed to be the ideal solution as it it upward compatible.
I'm assuming that restoring a database from an earlier instance will not work due to schema incompatibility.

Thanks
Mike

Brant Schroeder
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 6, 2022

@Mike Rolls You are correct both instances need to be on the same version for that migration style to work.  Are you able to snapshot your new instance just in case you have to roll back?

0 votes
Utkarsh Agarwal _Nagarro_
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.
January 6, 2022

Hi @Mike Rolls

To fix the missing attachments post site import you can try and use the solution mentioned on the KB article: How to restore multiple attachments from a file system backup in Confluence 

 

Kind Regards
Utkarsh

Mike Rolls January 6, 2022

Hi Utkarsh,
Thanks for the KB link - I'll review it.

Craig Castle-Mead
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.
January 6, 2022

I'm guessing that if the team running the target instance are reluctant to match versions, then they have existing content you're trying to merge with, so you couldn't use the site export/import option anyway as it would overwrite the target instance.

 

We've used the process in the KB @Utkarsh Agarwal _Nagarro_  mentioned to resolve attachment issues after a large multi-space migration (unplanned issues), but you MAY be able to use this approach to your benefit. Absolutely check this on a non-production environment first, but if your space is expecting it's attachments to be in a folder (/foo), before you export, if you rename /foo to /foo.broken and run the export, the resulting export should contain only the XML of the space/contents and soft references to the attachments, but not the attachments itself. If you then import the XML to the target server, then use the https://confluence.atlassian.com/confkb/how-to-restore-multiple-attachments-from-a-file-system-backup-in-confluence-1044789300.html process to figure out what /foo should be, and put your attachments in the expected location, it may work.

 

CCM

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
6.15.8
TAGS
AUG Leaders

Atlassian Community Events