Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,362,108
Community Members
 
Community Events
168
Community Groups

How to duplicate a Confluence space within the same cloud instance

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

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

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

Atlassian Community Events