Confluence EAR/WAR upgrade
Asked by Alain Estaris:

Hi all,

Does upgrading Confluence EAR/WAR only include updating either your `confluence.xml` or `server.xml `with the location of the new Confluence EAR/WAR version?

As per my understanding with the process, an EAR/WAR version 3.2.1_01 can directly go to version 5.5.4.

Regards,

Alain


Answers:
author: Nic Brough -Adaptavist-
body: You are wrong about the upgrade path - you should be going from 3.2 to 3.5, then 5.0 and finally 5.5

Collation errors are likely to be down to your database having the wrong collation settings in the database, on top of the errors you have probably introduced by not using the correct path through the versions. For later versions of Confluence, a utf based collation setting is required.

For MySQL, see [https://confluence.atlassian.com/display/CONFKB/How+to+Change+All+Columns'+Collation+to+utf8_bin+in+MySQL](https://confluence.atlassian.com/display/CONFKB/How+to+Change+All+Columns%27+Collation+to+utf8_bin+in+MySQL)


author: Wayne Wong
body: Hi Alain,

Confluence's recommended upgrade path is Upgrade to Confluence 3.5.17, then only upgrade to confluence 5.0.3, then only upgrade to latest confluence.

Nope, that is not they way you preform update.

The upgrade process allows you to unzip the new Confluence installation into a directory of your choice and then edit the configuration files to point your new installation to your existing data files. Follow these instructions:

1. Shut down your existing Confluence instance.
2. Download the Confluence EAR-WAR zip file: Go to the[Download Center](http://www.atlassian.com/software/confluence/ConfluenceDownloadCenter.jspa), and click '**Show all**' to find the EAR-WAR zip file.
3. **If you are on Windows** , please check your unzip program before extracting the downloaded zip file. Some archive-extract programs cause errors when unzipping the Confluence zip file. You should use a third-party unzip program like 7Zip or Winzip. If you do not have one, please download and install one before continuing:
   * [7Zip](http://www.7-zip.org/)--- Recommended. If in doubt, download the '32-bit.exe' version
   * [Winzip](http://www.winzip.com/)
4. Use your unzip program to unzip the installation file. You should now have a new directory called`confluence-<version>`.
   * In the rest of this document, we will refer to this as the`<Installation-Directory>`.
   * Do not use spaces in your directory path.
   * You can read more about the[Confluence Installation directory](https://confluence.atlassian.com/display/DOC/Confluence+Home+and+other+important+directories).
5. Edit the`confluence-init.properties`file found at:`<Installation-Directory>\confluence\WEB-INF\classes\confluence-init.properties`  
   and update '`confluence.home`' to point to your existing[Confluence Home directory](https://confluence.atlassian.com/display/DOC/Confluence+Home+and+other+important+directories).
   * Make sure you have first backed up your Home directory.
   * Open the`confluence-init.properties`file in a text editor such as Notepad.
   * Scroll to the bottom and find this line:

     |----------------------------------------|
     | `# confluence.home=c:/confluence/data` |

   * Remove the '#' and the space at the beginning of this line, so that Confluence no longer regards the line as a comment. The line should now begin with`confluence.home`.
   * Update the directory name after the`=`sign, to point to your existing[Confluence Home directory](https://confluence.atlassian.com/display/DOC/Confluence+Home+and+other+important+directories).
6. If you are using Tomcat, you need to update either your`confluence.xml`or`server.xml`(depending on where you have defined the Confluence[context descriptor](https://confluence.atlassian.com/display/DOC/Installing+the+Confluence+EAR-WAR+Edition)) to point to the location of the new Confluence installation (also remember to copy over any customisations such as a**tomcat datasource**if you have one).
7. If you have delegated your user management to JIRA, LDAP or any other external user management system, copy the following files from your old Confluence installation to your new Confluence installation:
   * `<Installation-Directory>/confluence/WEB-INF/classes/osuser.xml.`
   * `<Installation-Directory>/confluence/WEB-INF/classes/atlassian-user.xml`(if you are upgrading from Confluence 2.2 or later).

     Upgrading to Confluence 3.5+ and using JIRA user management?
     Icon  
     Please review our KB article first:[Upgrade to Confluence 3.5 with JIRA User Management Fails](https://confluence.atlassian.com/display/CONFKB/Upgrade+to+Confluence+3.5+with+JIRA+User+Management+Fails)  
     Icon  
     If you are upgrading from an earlier version of Confluence (2.5.5 and earlier) and are copying your existing`atlassian-user.xml`file from your previous instance, please ensure that the hibernate cache parameter in this file has been enabled, to avoid performance related issues. (NOTE: If you use Crowd for your user management, you do not need to do this.):  

     ```
     <hibernate name="Hibernate Repository" key="hibernateRepository"  description="Hibernate Repository" cache="true" />
     ```

8. If you have delegated your user management to Crowd, you will also need to copy the Crowd client library and configuration files from your old Confluence installation to your new Confluence installation:`<Installation-Directory>/confluence/WEB-INF/lib/crowd-integration-client-X.X.X.jar`and`<Installation-Directory>/confluence/WEB-INF/classes/crowd.properties`. If you need more information, please refer to the[Crowd documentation](https://confluence.atlassian.com/display/CROWD/Integrating+Crowd+with+Atlassian+Confluence).
9. Restart your application server and start Confluence.  
   ![(info)](https://confluence.atlassian.com/s/en_GB/5523/205577d01f4fb4efed99ead6d83b28ba8b59d647.27/_/images/icons/emoticons/information.png)**Please note**that Confluence will need to re-index attachments and this can take 5-10 minutes. Please wait until Confluence has finished indexing the attachments before trying to access Confluence via your web browser. (There is no easy and quick way to determine if the indexing process is completed. Please wait for approximately 10 minutes after the server start up before accessing Confluence via a web browser.)
10. During the startup process Confluence will create any missing database indexes. If you created any database indexes on your own, please check those afterwards and remove those that duplicate the indexes added by Confluence. Just in case you run into any errors which prevent Confluence from starting up, you can set the system property`hibernate.hbm2ddl.skip_creating_missing_indexes`to`true`to skip automatic index creation.
11. Visit Confluence in your web browser and log in using a username from your previous Confluence installation. You should be able to log in immediately, without seeing the Setup Wizard.
12. Take a quick look around your Confluence site to confirm that all your spaces and pages are present and everything looks normal. You should see the new Confluence version number in the page footer.
13. Consider any adjustments you need to make to customisations and special configurations, as described[below](https://confluence.atlassian.com/display/DOC/Upgrading+Confluence+EAR-WAR+Distribution#UpgradingConfluenceEAR-WARDistribution-customisation).

For more detail, please kindly refer to the documentation here [](https://confluence.atlassian.com/display/DOC/Upgrading+Confluence+EAR-WAR+Distribution)<https://confluence.atlassian.com/display/DOC/Upgrading+Confluence+EAR-WAR+Distribution>

Do let me know if you need further assistance :)

<br />

Regards,

Wayne Wong

comments: author: Alain Estaris
body: Hi Wayne Wong,

Thank you for your effort on answering my question.

The thing is, I'm upgrading from **Confluence 3.2.1_01** to the latest one. Collation conflict prevents Confluence from even starting. This error pops when I upgraded **Confluence 5.0.3** to **5.5.3**.

Do you have any idea on how would I solve this matter?

Thank you.

Alain Estaris


author: Alain Estaris
body: Hi Wayne Wong,

Thank you for your effort on answering my question.

The thing is, I'm upgrading from **Confluence 3.2.1_01** to the latest one. Collation conflict prevents Confluence from even starting. This error pops when I upgraded **Confluence 5.0.3** to **5.5.3**.

Do you have any idea on how would I solve this matter?

Thank you.

Alain Estaris

comments: author: Hao Doan
body: Hi Wayne,

I'm sure you're ready figured it out. This is for other searching for the answers.

What I did was create a new database with the collation *COLLATE SQL_Latin1_General_CP1_CS_AS,*and copy the data from one to another. Hopefully your db is not too big.

Here's a good reference from Atlassian Doc.

<https://confluence.atlassian.com/doc/database-setup-for-sql-server-9258.html>