Confluence won't start because build number mismatch
Asked by Adolfo Casari:

I installed latest Confluence version and restored a site backup (from OnDemand).

I am getting this error after reintializing Confluence (after the import it showed OK all spaces from the backup):
> Confluence will not start up because the build nuber in the home directory (4226) doesn't match the build number in the database (4323).

If I change in the config.xml the build number to 4323 and restart I get the error:
> `Confluence will not start up because the build number in the home directory (4323) is newer than the Confluence build number (4226).`

Any ideas?


Answers:
author: Khuong Vu
body: FYI, I upgraded Confluence from 5.7 to 6.0 when I get the same error raised here. I read a couple of suggested solutions, such as this page, and others, such as <https://jira.atlassian.com/browse/CONF-31055>, <https://jira.atlassian.com/browse/CONF-30829>. But I found the most logical explanation in <https://jira.atlassian.com/browse/CONF-29758> which took me to the knowledge base article, <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> , which solved my problem.


author: Septa Cahyadiputra
body: Hi Adolfo,

The best method is of course to use the documentation mentioned by Jobin, which will guide you to use the [OD version](http://www.atlassian.com/software/confluence/download-od) on your local server instead of the normal version.

A valid workaround is to use the following steps:

1. [Create a backup of your instance](https://confluence.atlassian.com/display/DOC/Production+Backup+Strategy)
2. Shutdown Confluence
3. Execute this SQL query

   ```
   DELETE FROM CONFVERSION;
   ```

4. Restart Confluence

Please note that the above workaround is not the recommended method to migrate from OnDemand and please test it on your staging environment first to avoid any issues.

Cheers,  
Septa Cahyadiputra

comments: author: Brent Locks
body: Thanks so much. Wasted 2 days on this until I found your solution.


author: Ellen Feaheny [AppFusions]
body: A workaround maybe - (used to work in old days. if I recall - Can't find the doc now)

* Make a dupe of the backup file you have.
* Edit the build number reference in the confluence-init.properties
* Save file, and restore Confluence and see if it works.

<https://confluence.atlassian.com/display/DOC/Restoring+Data+from+other+Backups>

Also - I am assuming that the new system you have installed is empty and there is no risk associated with this, based on the context of your comments.

comments: author: Ryan Goodwin
body: Build number is stored in the confluence.home/confluence.cfg.xml. It should not be in the confluence-init.properties. It is also in the xml backup in the exportDescriptor.properties file in the xml backup, but modifying this is not recommended across major point versions as there could be data structure changes between versions.


author: Jobin Kuruvilla [Adaptavist]
body: You need to download the latest onDemand version. See <https://confluence.atlassian.com/display/DOC/Migrating+from+Confluence+OnDemand+to+a+Confluence+Installed+Site>


author: Ellen Feaheny [AppFusions]
body: A workaround maybe - (used to work in old days. if I recall - Can't find the doc now)

* Make a dupe of the backup file you have.
* Edit the build number reference in the confluence-init.properties
* Save file, and restore Confluence and see if it works.

<https://confluence.atlassian.com/display/DOC/Restoring+Data+from+other+Backups>

Also - I am assuming that the new system you have installed is empty and there is no risk associated with this, based on the context of your comments.