Failure @XML Import
Asked by Markus:

Hi!

I've an Confluence Server 7.3.3 installed with MySQL 5.6 Database. Now I have exported an xml file which have a size of 25MB.

I want to import these file on my new Server with also Confluence Server 7.3.3 and MySQL 8. After this step I want to do an upgrade on the newest Confluence Version. But at the import step I get this failure and I didn't find any help for them:

Fehler beim Import. Weitere Informationen finden Sie in Ihren Serverprotokollen. com.atlassian.activeobjects.spi.ActiveObjectsImportExportException: There was an error during import/export with :Error executing update for SQL statement 'ALTER TABLE AO_54C900_C_TEMPLATE_REF ADD CONSTRAINT fk_ao_54c900_c_template_ref_cb_index_parentid FOREIGN KEY (CB_INDEX_PARENTID) REFERENCES AO_54C900_CONTENT_BLUEPRINT_AO(ID)'

Can you help me?


Answers:
author: Brant Schroeder
body: [@Markus](/t5/user/viewprofilepage/user-id/4643726) does the DB account that you are using have the proper permissions to perform an alter table command?

comments: author: Markus
body: I've used this command, I think this should be okay...

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, INDEX, DROP, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON ....


author: Markus
body: I've tried it again with this setting:

GRANT ALL PRIVILEGES ON ....

but problem is still the same.


author: Brant Schroeder
body: [@Markus](/t5/user/viewprofilepage/user-id/4643726) did your grant all command complete for the user? If it did are you able to login as that user and then run an alter table command?


author: Markus
body: [@Brant Schroeder](/t5/user/viewprofilepage/user-id/769100)

How can I test this easily?

This was my full command for the user to grant the privileges on the DB:

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, INDEX, DROP, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON Confluence.\* TO 'confluencedb'@'localhost';

This command was in the attlassian knowledge base.


author: Brant Schroeder
body: On the DB you run the following select statements to see what permissions have been provided to your user:

SELECT \* FROM mysql.user WHERE user = 'confluencedb'@'localhost'  
SELECT \* FROM mysql.db WHERE user = 'confluencedb'@'localhost'


author: Markus
body: [@Brant Schroeder](/t5/user/viewprofilepage/user-id/769100)

This everything is working. Now I've found out that the problem could be in the old exportet DB. There a failures when I open some site in the old wiki:![Failure.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/171075iE3F50DE0A94A0D53/image-size/large?v=v2&px=999 "Failure.JPG")

And the newest failure when I try to import on new wiki site is these:

Fehler beim Import. Weitere Informationen finden Sie in Ihren Serverprotokollen. com.atlassian.activeobjects.spi.ActiveObjectsImportExportException: There was an error during import/export with :Error executing update for SQL statement 'ALTER TABLE AO_5FB9D7_AOHIP_CHAT_USER ADD CONSTRAINT fk_ao_5fb9d7_aohip_chat_user_hip_chat_link_id FOREIGN KEY (HIP_CHAT_LINK_ID) REFERENCES AO_5FB9D7_AOHIP_CHAT_LINK(ID)'


author: Brant Schroeder
body: [@Markus](/t5/user/viewprofilepage/user-id/4643726)

Can you explain the steps you are taking to restore your instance?


author: Markus
body: [@Brant Schroeder](/t5/user/viewprofilepage/user-id/769100)

I use the backup \& restore feature in Confluence! I do a backup here (sorry, it's german, but I think you know the section for that):

![Backup.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/171091i667298511B8F56D7/image-size/large?v=v2&px=999 "Backup.JPG")

The I get the xmlfile by SSH from the "old" confluence server and tranfer them to the new confluence server. After that I try an import on the new confluence system  

![Restore.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/171092iF09A5F3BED1CD89E/image-size/large?v=v2&px=999 "Restore.JPG")

Thats all...


author: Markus
body: [@Brant Schroeder](/t5/user/viewprofilepage/user-id/769100)

No ideas any more?


author: Brant Schroeder
body: How large is the zip file?


author: Markus
body: [@Brant Schroeder](/t5/user/viewprofilepage/user-id/769100)   

\~ 96MB


author: Brant Schroeder
body: [@Markus](/t5/user/viewprofilepage/user-id/4643726) Sorry to be MIA I was out for a while. I am out of ideas as to why the import would not work. Have you tried just backing up the DB and moving it that way? Then migrating the home directory and then updating the connection string to see if that works?

<https://confluence.atlassian.com/doc/migrating-confluence-between-servers-184150.html>


Tags: confluence-server

server