When importing previously exported space I get this error
ERROR: insert or update on table "spacepermissions" violates foreign key constraint "someVeryLongKeyBlaBlaBla" Detail: Key (spaceid)=(123456789) is not present in table "spaces".
note: I changed key constraint value and spaceid
What does it mean and how to resolve it?
Do I need to do something special when exporting space. It used to work without any problems.
Reporting I'm running into the same error. This is popping up after I try to import a space exported from a Confluence Cloud instance into another Confluence Cloud instance.
EDIT: I've raised a support request on this and will get back here if I learn anything.
EDIT 2: Heard back from support, this is a known recent bug impacting the XML export process of the space, documented here:
https://jira.atlassian.com/browse/CONFCLOUD-76197
Workaround is to do a CSV export and import that instead.
I tried the CSV export still getting the same error. Any other options here?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Getting the exact same issue even with CSV export-import.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Migrating from Server to Cloud
I am running into this issue as well. Not sure what is going on. I tried this around November of last year for the 8 spaces that have failed due to attachment errors. But now I am getting the error you have reported with the foreign key constraint and I am also (for other spaces) getting the "Transaction rolled back because it has been marked as rollback-only" error.
These are the same exact spaces so I am not sure as to why these are now failing to import. This was the only option I had to migrated these over due to the fact that they continued to fail to migrate through the migration assistant for "Failed to migrate space attachments".
Also since I am going from Server to Cloud there is no CSV option. I only have HTML, XML, and PDF.
Yea the CSV thing doesnt really work.
MUST HAVE ORG-ADMIN PERMISSIONS FOR THE SOLUTION BELLOW.
One option that can work ( I have not tried this myself since my issue is specifically my sandbox ) is doing the import into the confluence cloud sandbox instance.
Select the projects that you have imported to copy over and start. They will notify you once the process is complete.
My specific problem seem to have steemed from corrupted data within my confluence for the specfic projects I had to import. Since they existed before and then they were deleted in order to test the migration again, this had some weird effect on the import. When I did this within a different confluence instance the import worked just fine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am receiving the same error when attempting to import multiple spaces yesterday and today. Out of 5 spaces none have succeeded, all reporting this same error, or the more generic "Transaction rolled back because it has been marked as rollback-only" with no further information. It seems to sometimes alternate between the two errors upon re-attempts to import the spaces.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Roger Groom ,
Have you tried importing them 1 at a time? I used to get this same error. A lot of the attempts that failed were due to thinking that the space has been deleted (I re-imported several times for testing reasons) but when you delete a space it goes to the trash (soft delete). You need to navigate to trash and remove it there (hard delete). Give it about 5 to 10 minutes and then try again.
If this still doesnt work you can try to import it in a fresh sandbox environment and then try my solution above.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.