Space ABC was exported (xml format) a few months ago. Can I import the same XML without overriding?

Bryan Urias December 7, 2022


Context: Space ABC has been growing for a few years now. It was decided back in 2021 to make a copy of the work, for backup purposes, so we exported XML.

Fast forward to the present time, certain things in Space ABC have either gone missing, are broken, or just need to be reverted back to match the content from the export. 

I am able to go to Settings > Administration > Import Space to upload the XML, but have concerns that the current production version of Space ABC will be overwritten if I begin that upload (since the XML / Space ABC share the same key).

This is the goal of course, but need to verify upload is good before doing so 

I currently don't have access to Confluence Premium, thus no-sandbox environment to work with. Any suggestions or workaround? 



1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 7, 2022

Welcome to the Atlassian Community!

The short answer is;  The space importer will not import a space with the same key as an existing one.  Your import will fall over at the first hurdle!

That's of no use to you, of course, other than the basic "don't kill what I've got already" protection.  You do have some options, but they're unfortunately going to be quite manual.

To do the import without a sandbox, you could

  • Fire up an evaluation Cloud system and use it as a sandbox.  Even with a trial, the full functionality of Confluence is there.
  • Do a search and replace on the XML.  Unlike Jira data, this can work really well with Confluence data - if you change everywhere that the Space key is used to something you don't already have in your target Confluence, you'll be able to import the file into a new space.
  • Start messing around coding stuff with REST or apps.  I'll keep that one very short because, well, nah, the first two are far better options for your scenario

In all of these, you will then need to think about how you merge or replace each page.  The first two import options will leave you with "current space" and "restored space with a different key", and you'll be wanting to move some or all of the restored stuff into the current space.  This could be easy if you just want a direct replacement (i.e. destroying everything added to the space since you did the 2021 export) - delete the current space and use the restored one!  But I suspect you'll really want to be deleting some pages and then moving the restored versions back in.

Bryan Urias December 7, 2022

Thank you Nic - this was very helpful! If I go with the search & replace method, is there a tag I should be on the lookout for when I replace the Space ID? ie: <id></id> or CDATA[{Space ID} BCDv]?


Thanks a million! 


Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events