I recently backed up a space as XML using the Backup Manager. Now I am trying to import the space but am getting an error which says a space with the same key already exists.
So, I then changed the key of the existing space and tried again. Now there is no space with that key, but I am still getting the same error message saying the key already exists!
How can I resolve this?
Hello @Matthiew Marks
Welcome to the Atlassian community.
Are you trying to import the space into the same Confluence instance from whence you created the backup, or a different Confluence instance.
Reference: the community post discussing the Confluence Space Key Renaming feature I see in the comments that it says that links that include the original Space Key will automatically redirect to the new space key.
Based on that it seems that Confluence Cloud keeps track of the original key so that redirection can be supported.
Therefore the key still exists and cannot be used by another new or imported space.
Can you change the space key in the original space your are trying to import and create a new backup?
The alternative to that might be to modify the XML to replace the used key with a value that has not been used in Confluence Cloud, but I don't know all the ramifications of that.
@Trudy Claspill I tried replacing all references to the space key in an XML file... still did not work. I presume it can be done programmatically by someone who knows exactly what to replace, but a mear find/replace did not work me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Matthiew Marks
What exactly is the use case of re-importing a backup (other than restoring a backup but then the question would why the original space still exists....).
Is it to clone the original space? If so, there are other methods how to achieve that.
In your current situation, you may consider using another Confluence site as mediator. Import backup to a new site, change the space key, export it, import to the original site. I used that method once or twice in the past (albeit I did not work with a backup but with an exported XML file).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.