Restoring Confluence XML site backups fails: Import failed. Check your server logs ...
Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.
When trying to restore a XML site backup, it fails near the end of the import with the following error:
Import failed. Check your server logs for more information. Transaction rolled back because it has been marked as rollback-only
The following appears in the atlassian-confluence
2017-06-26 07:53:21,952 ERROR [Long running task: Importing data] [atlassian.confluence.importexport.KeyInitPostImportTask] execute Problem when init Confluence key after a site import -- url: /confluence/longrunningtaskxml.action | traceId: 3598ae31fb625e39 | userName: admin | referer: https://www.<YOURCONFLUENCEURLhere>/confluence/admin/restore-local-file.action | action: longrunningtaskxml
Run the following query to determine if you are missing or have a malformed Server ID in the database of the source instance.
select * from BANDANA where bandanakey = 'confluence.server.id';
The Server ID is malformed or missing from the source instance database. When restoring a XML site backup, Confluence looks for the server ID when creating application links.
Manually add the correct Server ID to the database.
Alwaysyour data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.
Use the following insert into statement to add the Server ID.
INSERT INTO BANDANA VALUES (FREE-BANDANAID-VALUE, '_GLOBAL', 'confluence.server.id', '<string>Your-Server-ID</string>');
Create a new XML site backup for restore.