Upgrading Confluence from 4.2 to 6.x and Windows/SQL Server from 2008 to 2016
Asked by Daniel S?derman:

Hi,

We are going to upgrade Confluence from 4.2 to 6.x and I am looking for the best upgrade path to do this, we have around 1200 users. Currently Confluence runs on Windows Server (WS) 2008 with SQL Server 2008 so we are also going to move it over to new servers and upgrade to Windows/SQL Server 2016.

So for Confluence we are going to upgrade from version 4.2.13 to 5.10 to 6.x in two steps. But I don't know the best order to do server and database migration. Here is my current high level plan (we are going to test this first in a staging environment). It will be done in one go, probably over a weekend, with verification in between each step.

**Start state:** App server: WS 2008/C. 4.2.13 (Java 1.6), DB server: WS 2008/SQL S 2008

**Step 1:** upgrade Confluence to 5.10 with installer on current app server

**State**: App server: WS 2008/C. 5.10 (Java 1.8), DB server: WS 2008/SQL S 2008

**Step 2:** Migrate to new app server with WS 2016 based on this [instruction](https://confluence.atlassian.com/doc/migrating-confluence-between-servers-184150.html)

**State:**App server: WS 2016/C. 5.10 (Java 1.8), DB server: WS 2008/SQL S 2008

**Step 3:** Setup new DB server and migrate data there based on this [instruction](https://confluence.atlassian.com/doc/migrating-to-another-database-148867.html)

**State**: App server: WS 2016/5.10 (Java 1.8), DB server: WS 2016/SQL S 2016

**Step 4:** Upgrade Confluence to 6.x with installer on new servers (with new DB driver)

**State**: App server: WS 2016/6.x (Java 1.8), DB server: WS 2016/SQL S 2016

**Step 5:** Or in parallel, setup new webserver with WS 2016

So here are som concerns I have. Any feedback would be welcome, thanks.

1. Potential compatibility issues. Will Confluence 5.10 and Java 1.8 work with WS 2008 and SQL server 2008? Will Confluence 5.10 work with SQL server 2016? Is it safer to go to SQL server 2014 instead of 2016?
2. Can step 2 and 3 be done at the same time?
3. Move to new DB server and versions, is XML copy the way to go or are there some better ways? Database cloning for example, not sure what is possible with SQL Server.

Best Regards   
Daniel


Answers:
author: Shannon S
body: Hello Daniel,

What an undertaking! It appears you've done quite a bit of research already on the subject. Thank you for sharing your plans for migration.

So, JAVA 1.8 will be supported by Confluence 5.10, so no problem there.

My recommendation would be do perform your Confluence upgrades first, get up to your desired version, and then migrate to the new Windows and database server.

You can, of course, do those two steps together (migration of database and Windows server), but then if there's an issue you won't be able to narrow down if it's the Database server at fault or the Windows server. This is why we recommend to do the two separately.

Another option, which is much faster, and the answer to your 3rd question, is to just migrate the site XML backup from one server to another.

For example:

1. Setup a clean version of 6.x on your new database and server.
2. Export site from 4.2 Confluence.
3. Import straight into 6.x Confluence.

For more details, see [Restoring a Site](https://confluence.atlassian.com/doc/restoring-a-site-152034.html).

Something to note, that this is generally not a recommended method of upgrading Confluence, but I have seen many users upgrade this way without issues. Since you're testing, this is something you could give a try and may work without any problems.

As you can see according to our [Migrating to Another Database](https://confluence.atlassian.com/doc/migrating-to-another-database-148867.html) article, the XML backup method is the recommended method for migrating databases.

I hope that helped clarify a few things, but do let me know if you have any questions about it.

Regards,

Shannon

comments: author: Daniel S?derman
body: Hi Shannon,

Thank you so much for taking the time to answer my questions and for the great suggestions, really appreciate it!

The site backup option sounds very intriguing, I think i'll test that, a few questions though.

*"My recommendation would be do perform your Confluence upgrades first, get up to your desired version, and then migrate to the new Windows and database server."*So, there should be no problems running Confluence 6.13 (for example), for a short time, on WS 2008 and SQL Server 2008 before migrating? This is maybe implied by your answer but still, just to make sure...

About the Site export/import. Is database/attachments size a problem here? My attachments library size is 9.3 GB, 41 225 files. Not sure about the database, but we have 189 spaces and maybe 4000 pages.

Will taking the backup from production slow down the system so it is noticeable for end users? I have not done that before.

Again, thanks for the help!

Best regards  
Daniel


author: Shannon S
body: Daniel,

My apologies for the delay.

Regarding running Confluence 6.13 on WS 2008 and SQL 2008 during migration, I spoke with the Premier Support team here at Atlassian to be sure. They let me know that it is technically not supported, but they do not foresee any issues at least for you to get migrated over to the new versions.

For the site export, you are right that the XML backup is not recommended for large sites. From [Site Backup and Restore](https://confluence.atlassian.com/doc/site-backup-and-restore-163578.html):
> There are a number of reasons why XML site backups are unsuitable for large Confluence sites:

*
  > As the number of pages in your site increases, the XML backup takes progressively longer to complete, and in extreme cases the process of generating the export can cause an outage.
*
  > XML backups can consume a lot of disk space rapidly. For example a 1GB Confluence site will create 30GB worth of backups in a month, if unattended.
*
  > If the XML export file is very large, restoring your site can take a long time, or may time out.
*
  > Marketplace and other user-installed apps are not included in the XML backup. After importing your backup into a new Confluence site, you will need to re-install all user installed apps.

However, on the [database documentation](https://confluence.atlassian.com/doc/migrating-to-another-database-148867.html) I mentioned, there's a solution below:

**Method two -- for installations with a large volume of attachments**(here I have skipped to the section on restoring from XML)

*
  > On the load content step, choose **Restore From Backup**. This is where you will import the data from your XML backup. There are two options for accessing the XML file:
  *
    > Browse to the location of your XML backup on your network, and choose **Upload and Restore**.
  *
    > Alternatively, put the XML file in the Confluence home directory of the new site (`<CONFLUENCE-HOME-DIRECTORY>\restore`) then choose **Restore**. This is the recommended method for large XML files.

Additionally, with this procedure, you copy your attachments across manually, and re-install your Confluence add-ons.

I hope that clarifies things. let me know if you have any questions about this.

Regards,

Shannon


Tags: confluence-server

server