My confluence import fails and the troubleshooting advice don't seem to match with what i am seeing.
Asked by Patrick Perkins:

Can anyone help me.

Im going from 5.01 to the latest version of confluence and i get this error 19% into the restore

Import failed. Check your server logs for more information. com.atlassian.confluence.importexport.ImportExportException: Unable to complete import: Error while importing backup: could not resolve property: userName of: com.atlassian.confluence.security.ContentPermission

I went through the troubleshooting advice on the atlassian website but it was no help

This is very frustrating


Answers:
author: Sloan
body: Hi [@Patrick Perkins](/t5/user/viewprofilepage/user-id/1032752)

Importing and exporting from a much older version can cause problems.

I recommend only to import from Confluence with the same or a close version.  
A working practise in this case is to upgrade your Confluence 5.01, create the export, and then import it into your Confluence 6.7.x.

**Backup and restore is no good substitute for Updating!**

Best Regards  
Niklas

comments: author: Patrick Perkins
body: Thanks for the quick response Niklas.

I will follow your suggestion.

I have to say that this has been an extremely frustrating endeavor.

We want to increase our users to 25. And before we purchase the license we wanted to get our current system up to the latest release. After purchasing two 10 user licenses we now run into this problem.

I wonder how many more ten user licenses I will have to purchase to make this work.

Extremely frustrating


author: Sloan
body: Hi again Patrick

I suggest getting a Evaluation License on my.atlassian.com or generate a [staging license](https://confluence.atlassian.com/jirakb/how-to-get-a-jira-developer-license-744526918.html) there. It is really not necessary to buy multiple licenses for testing!

Please contact the [Atlassian sales support](https://www.atlassian.com/company/contact)! They may be able to resolve this and help you with upgrading your license.

And instead of exporting and importing from an old version to a new one, go the standard route and update. This guide will help you: [Upgrading Confluence](https://confluence.atlassian.com/doc/upgrading-confluence-4578.html)

Regards  
Niklas


author: Patrick Perkins
body: Niklas,

I did as you suggested and followed the instructions for the upgrade and now i have a fatal error starting up this new version of confluence

I have an exception that says the following

Confluence will not start up because the build number in the home directory \[4107\] doesn't match the build number in the database \[3277\].

I don't understand why this is so difficult


author: AnnWorley
body: This article lists 3 scenarios that can cause that error, along with suggested resolutions:

[Confluence will not start up because the build number in the Home Directory doesn't match the build number in the Database, after upgrade](https://confluence.atlassian.com/confkb/confluence-will-not-start-up-because-the-build-number-in-the-home-directory-doesn-t-match-the-build-number-in-the-database-after-upgrade-376834096.html)

The gist is that an upgrade failed or was partially restored.


author: Patrick Perkins
body: IF the upgrade failed it didnt tell me anything. All i did was run the upgrade from 5.01 to the latest release.

Nor did i partially restore this database. it was an upgrade.

Now i have an even different problem

MyISAM is configured as the default storage engine in your database, which may result in data integrity issues. Please see <http://confluence.atlassian.com/x/voTcDQ> for more information.

this just seems to be getting worse


author: Patrick Perkins
body: this has been working perfectly for years and all i want to do is get it up to the current release. Nothing has changed


author: AnnWorley
body: Please verify that these are the high-level steps you took:

1. Installed a fresh Confluence 5.0.1 to test the upgrade
2. Restored your XML site backup from Production
3. Ran the Confluence 6.7.x installer (.zip or .bin script) to upgrade
4. Got the build number error and the storage engine errors after upgrading.

If the build number error was after the import but before the upgrade, follow the workaround on [Home directory and database build number mismatch in Confluence 5.1.x after a site restore (NOT after an upgrade)](https://jira.atlassian.com/browse/CONFSERVER-29758)

If the build number error didn't appear until after the upgrade, please follow the resolution on: [Confluence will not start up because the build number in the Home Directory doesn't match the build number in the Database, after upgrade](https://confluence.atlassian.com/confkb/confluence-will-not-start-up-because-the-build-number-in-the-home-directory-doesn-t-match-the-build-number-in-the-database-after-upgrade-376834096.html)

Either way, please restore the database and home directory to the pre-upgrade states, and change the storage engine on the test instance before starting again, as described in [Convert from MySQL MyISAM to InnoDB Storage Engine](https://confluence.atlassian.com/confkb/convert-from-mysql-myisam-to-innodb-storage-engine-232555710.html)

After testing the steps in your pre-production environment you can schedule a maintenance window to do the Production upgrade, and be pretty confident there won't be any surprises.


Tags: import