Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot import space because space with the key already exists

Dev Development
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 29, 2023

I exported a zip from from our old cloud to import the space to our new cloud environment. I received an error " A space with the key CDA already exists". 

screen1.jpg

1. Why is my main site stating that the space exists even though I can't see it and can't delete it?

image.png

2. Can you please add a bug to the bug tracker cloud confluence?

Confluence Free comes with Community Support. There is currently no option to upgrade to a paid plan to get customer support.

image.png

 

Thanks,

 

Dev

2 answers

2 votes
Jack Brickey
Community Champion
December 29, 2023

hi @Dev Development , Can you try to rename your space prior to import?

Dev Development
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 30, 2023

@Jack Brickey hi. Do you mean rename the space from our old cloud before exporting? I didn't find such an opportunity.

image.png

0 votes
Nic Brough -Adaptavist-
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.
December 30, 2023

I'm afraid you cannot change the key of a space on Cloud, so you can not import a space with the same key into another Cloud system.

There are two workarounds, but one is rather risky and may not work properly, depending on the content of the space.

The risky one - export the space, then decompress the zip file so that you end up with a number of files.  Open each .XML file that is not an attachment in a text editor, and use search and replace to change the key used in the space.  (In your case, replace CDA with the key you want to use like CDANEW).  Take care not to replace any word that might contain the key anywhere that it is not being used as the space key.  Zip the files back up into a new export package and import it.

The safe one - create a new space in the source Confluence, with the new key that you want to use in the target (a new unused key of course), and move all the pages from the old space into it.  Export the new space and import it.

Jack Brickey
Community Champion
December 30, 2023

Well, how sad! I just assumed renaming was a thing. I guess I never tried that. I like the safe approach. I do wonder the cause of the issue. Does the old key remain post trashing? I was thinking emptying the trash cleared all remnants. 

Nic Brough -Adaptavist-
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.
December 30, 2023

It's ony been a few of years since we got "change project key" in Jira, it's not been done in Confluence yet.

I'm not sure about Confluence trash, deleting a space and emptying the trash might free up the key.  (It does not in Jira - it retains the key so that it can still show a full history of issue moves)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events