Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to duplicate a Confluence space within the same cloud instance

Vithit Kuruchittham (Vic) June 29, 2019

I would appreciate an advice on how I could duplicate the space from within the same cloud instance. I have exported the space, however when I imported it, the import errored out at the last stage citing the same space key. I cannot edit the space key. So how can this possibly be achieved?

 

The scenario is that I need to backup the space which has many file attachments and keep this as a snapshot (backup) in case I need to compare or revert back. This space is customer facing and will be going through major structural and content changes, so I need a way to be able to duplicate then edit until we are ready to release the new space. Or I edit using the current space and duplicate for the backup and revert back possibility.

 

Thanks a lot.

2 answers

0 votes
Jakub Stephan August 12, 2022

Hi Kiran,

 

I'm trying to do the same -> I've exported single space and i want to import it with different name.

 

I've downloaded the zip, replaced all occurances of old space key & name but i have problem during my upload:

 

```

ERROR: insert or update on table "spaces" violates foreign key constraint "fk7ndewmrl3hqcpwc8eydn9mv8j" Detail: Key (spacedescid)=(61243392) is not present in table "content".

```

 

Do you have any idea how to fix that ?

0 votes
Kiran Panduga {Appfire}
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 30, 2019

Hi

You will not be able to import the XML backup with the same spaceKey. However, as a workaround, you can modify the export files and then import i.e

Unzip the Space Export zip file.

In exportDescriptor.properties file, change the parameter spaceKey with the new spaceKey

In entities.xml, find and replace the old spaceKey parameters with the new one i.e look for

Spackey= or <Spackey>

Zip the attachments, exportDescriptor.properties, and entities.xml file and then try importing into the confluence. 

Thanks,

Kiran.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events