Import space issue, space already exists
Asked by Richard Busch Nordli:

Hello.

Our goal is to export a space from a Confluence (5.6.6) Server solution to Confluence Cloud, and I'm having a issue with the import. This is what I've done:

* Exported old space from Confluence Server
* Uploaded the export file to WebDAV
* Chose the uploaded file (around 400 mb) under the menu "Import Spaces"

After a halv a minute or so I get this error message:

image2016-1-21 12:22:56.png

I had a space with the name ARKIV earlier, but deleted it to make the key available for the import. It no longer show up under "all spaces".

However, if I modify the URL to domain.[atlassian.net/wiki/display/ARKIV/](http://atlassian.net/wiki/display/ARKIV/), I get this error:

image2016-1-21 12:25:46.png

While I expected to get this error:

image2016-1-21 12:26:14.png

If it is relevant, we also have JIRA cloud under the same account. The JIRA project with key ARKIV is also deleted.

* May it be that the cloud solution needs a day or so to reindex?
* Am I doing something wrong?

Thanks for any help,

Richard

[](https://community.atlassian.com/t5/Confluence-questions/Import-space-issue-space-already-exists/qaq-p/293601?attachment-id=8481){#link_11912a2db8f529}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/49700/1/image2016-1-21%2012%3A26%3A14.png){#display_11912a2db8f529_0}  
[](https://community.atlassian.com/t5/Confluence-questions/Import-space-issue-space-already-exists/qaq-p/293601?attachment-id=8482){#link_11912a2db8f529_0}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/49700/2/image2016-1-21%2012%3A22%3A56.png){#display_11912a2db8f529_2}  
[](https://community.atlassian.com/t5/Confluence-questions/Import-space-issue-space-already-exists/qaq-p/293601?attachment-id=8483){#link_11912a2db8f529_1}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/49700/3/image2016-1-21%2012%3A25%3A46.png){#display_11912a2db8f529_4}


Answers:
author: Jonathan Soo
body: Hi,

There's a easier workaround :

1. Access to your backup folder \> open up exportDescriptor.properties with your favorite text editor \> search for the space key 'ARKIV' \> locate 'ARKIV' and manually change the space key to something else. (eg : 'ARKIV(1)')

2. Import.

Hope this helps.  

Regards,  
Jonathan

comments: author: Richard Busch Nordli
body: Thank you @Jonathan Soo Wai Hou. I tried what you said, but end up with this error message:

image2016-1-22 9:58:31.png

Should I change all references in the entities.xml as well? I find these two types of references:

```
<property name="context"><![CDATA[ARKIV]]></property>...	<spaceKey>ARKIV</spaceKey>
```

I'm not too technical, but would it work to change it to this setting?

```
<property name="context"><![CDATA[ARKIV(1)]]></property>...	<spaceKey>ARKIV(1)</spaceKey>
```

Thank you  
[](https://community.atlassian.com/t5/Confluence-questions/Import-space-issue-space-already-exists/qaq-p/293601?attachment-id=12678){#link_11912a3a9936ef}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/49702/1/image2016-1-22%209%3A58%3A31.png){#display_11912a3a9936ef_0}


author: Yogesh Mude
body: HI [@Jonathan Soo](/t5/user/viewprofilepage/user-id/502318)

It will not work...we need to remove all the entries from the db it seems...

I tried as you suggested but getting below errors..

```
Import failed. Check your server logs for more information. com.atlassian.confluence.importexport.ImportExportException: Unable to complete import because the data does not match the constraints in the Confluence schema. Cause: JdbcSQLException: Unique index or primary key violation: "UK_JP1AD5YUFSIH5R7LQRYGAKPUG_INDEX_9 ON PUBLIC.SPACES(SPACEKEY) VALUES ('DEMO', 98306)"; SQL statement: insert into SPACES (SPACENAME, SPACEKEY, LOWERSPACEKEY, SPACEDESCID, HOMEPAGE, CREATOR, CREATIONDATE, LASTMODIFIER, LASTMODDATE, SPACETYPE, SPACESTATUS, SPACEID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [23505-196] 
```


Tags: cloud

confluence-cloud

import

space