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)
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
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 org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
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.
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
Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...
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!
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