Confluence 6.2 Unable to complete import (cloud to server) Edited

Hi,
I tried to migrate confluence from the cloud to the servers
I did a backup with no attachments and when I start restoring the data it crashes after a few minutes (the database is on SQL Server 2014 SP2, confluence is installed on linux)

import error.PNG
Here is the error that I have in the log

 2017-05-29 15:22:30,519 ERROR [Long running task: Importing data] [confluence.importexport.xmlimport.BackupImporter] importEntities Cannot import the entities:
-- url: /longrunningtaskxml.action | referer: http://localhost:8090/admin/restore-local-file.action | traceId: f3fa46027d449cf0 | userName: admin | action: longrunningtaskxml
com.atlassian.confluence.importexport.ImportExportException: Unable to complete import: Error while importing backup: not-null property references a null or transient value : com.atlassian.confluence.setup.bandana.ConfluenceBandanaRecord.key
at com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.doImport(DefaultXmlImporter.java:64)

.....

Caused by: org.xml.sax.SAXException: Error while importing backup: not-null property references a null or transient value : com.atlassian.confluence.setup.bandana.ConfluenceBandanaRecord.key
net.sf.hibernate.PropertyValueException: not-null property references a null or transient value : com.atlassian.confluence.setup.bandana.ConfluenceBandanaRecord.key
at com.atlassian.confluence.importexport.xmlimport.parser.BackupParser.endElement(BackupParser.java:45)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at o

2 answers

0 votes
Ann Worley Atlassian Team May 30, 2017

It looks like the error is similar to the one described in XML import fails due to error: not-null property references a null or transient value

From the log snippet, you have an issue with the bandana table rather than the links table. The knowledge base article recommends running some queries on the source database, which is Cloud in your case. The Atlassian Cloud support team can run the queries for you as you won't have access. Please open a ticket at https://getsupport.atlassian.com.

Thank you I opened a ticket on the support 

I hit the same problem, and Atlassian Support fixed the Confluence Cloud database.  However I also managed to fix it by editing the XML thusly:

unzip -p Site_Backup.zip entities.xml > entities.xml.orig
xmlstarlet sel --noblanks -t -v "//object[@class='ConfluenceBandanaRecord' and property[@name='key'] = '']" -n < entities.xml.orig # Find the blank node. Yours may not be 'DefaultLoginManager' assumed below.
xmlstarlet ed --delete "//object[@class='ConfluenceBandanaRecord' and property[@name='key'] = '' and property[@name='context'] = 'com.atlassian.confluence.security.login.DefaultLoginManager']" entities.xml.orig > entities.xml
zip -u Site_Backup.zip entities.xml

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 09, 2018 in Confluence

Introducing Praecipio Consulting, an Atlassian Solution Partner

Hey there Community!  My name is Vannya Vallejo, the Channel Communication Specialist at Atlassian and I want to help Atlassian users like you learn about our Solution Partners and how they c...

389 views 0 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you