Cannot insert duplicate key in object 'dbo.Spaces' encountered when importing a space from Confluence Cloud site
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
When importing a space which was exported from a Confluence Cloud site, you encounter a "Unique key constraint 'UK_jp1ad5yufsih5r7lqrygakpug'. Cannot insert duplicate key in object 'dbo.Spaces'. The duplicate key value is ()" error message.
Cause
CONFCLOUD-64563 - Space export may export multiple spaces
Solution
Open a Cloud support ticket and engage them to address CONFCLOUD-64563 - Space export may export multiple spaces for this site
Re-export the Cloud space
Delete any previously partially-failed imported spaces in the target environment
Re-import the Cloud space
Was this helpful?