Error message: "Confluence tables already exist in the selected database"

I'm attempting to migrate a Confluence server and it's not working. I installed postgresql on the new server (same version as old), and created a database to match the old one. I "dumped" the old one, and loaded it into the new one with no errors. I also installed tomcat on the new server, and performed a new install of Confluence using the WAR file. When I go to my new server (http://server:8080/confluence) I'm brought to the "Configure Database" page. I select "Direct JDBC Connection" to match the old installation, enter in the correct URL and user name and password to match the old one, yet, I always get the error message shown above. I don't understand the error message - I was hoping the tables already exist in the database, but confluence isn't so happy. Was it expecting a database with no tables? I tried that too and the end result is always the same - tomcat dies. Any help would be appreciated.

5 answers

1 accepted

This was never resolved. I'm closing it since I don't have time to figure it out.

Verify that confluence-installdir/confluence/WEB-INF/classes/ == the place where you unzipped the home dir.

Verify that the confluence.cfg.xml in the home folder lists that the setup-step is complete. Verify that your hostname for the db in confluence.cfg.xml is sensible.

I ran into the same issue that "gar" reported above where I was trying to migrate Confluence from one server to another.  I got the same error saying that tables existed in the database, which was expected since the database was from another instance, but I couldn't proceed with the Confluence setup wizard.

I found that the home directory mentioned in my <install_dir>/confluence/WEB-INF/classes/ file was incorrect, and it was pointing to a blank folder.  Modifying that to point to the desired confluence-home folder based on the location that I loaded the confluence-home files into worked.  I re-ran the "" script and the "" script, and Confluence started up as expected.

Thanks Tim Wong!

Hi, did you copy the Confluence home directory? I think this is what's missing.

I did not, but I will try it. Is there some particular file(s) that is needed? Does the entire directory get copied even if the original server was a stand-alone and the new one is running off tomcat?

The entire directory needs to be copied and configs changed if required.

Like Harry said, you may like to refer the below link to cross check whether your is pointing towards the correct confluence-home directory -

That didn't fix it, in fact, it's a bit worse now. The old confluence home directory was tarred up and copied over, and the files (both of them, one under tomcat, one under confluence install directory) were modified to point to the new confluence home directory. Now I can't even start the tomcat manager to get to the deployed apps - attempting that kills tomcat.

I believe I noted this before, the previous install was standalone, the new one runs under tomcat. The files therefore look a bit different. Also, the old confluence version was 4.1.7, the new one is 4.3.7. It sounds like a config issue - but which file needs modifying?

Hello Gar,

I just wanted to echo what was said above. It sounds like you did not move your <confluence_home> direcotry to the appropraite location. An upgrade should never prompt you to configure your database. The connection should already be set up in your <confluence_home>/confluence.cfg.xml.

One of the things that I noticed is that it appears that you are trying to migrate from the standalone to a WAR install and upgrade all in the same go. It may be a good plan for you to try only one of these steps at a time. It also may be a good plan to examine if you really have a business case to use the WAR installation. This setup tends to complicate installation and support of your instance. If you can get away with the standalone install it is probably best.

When installing your new Confluence all you should need to do is change your <confluence_install>/confluence/WEB-INF/classes/ to point to your existing <confluence_home> directory. That and a startup of your instance should be all that is required to trigger the upgrade tasks for Confluence

Thanks for the reply Daniel. I agree I shouldn't try upgrading at the same time, but there seems to be no older versions of WAR files to download. Does anyone know where those can be found on the Atlassian site?

As for migrating a server from a stand-alone to a containerized one, I also agree it might be a bit involved, but I'm not willing to give in just yet. It's just a business preference to run this under Tomcat. Surely I'm not the first one to try this sort of migration, but so far, it appears as if I am as I have found no documentation.

Nevermind about the archive WAR file - I found it using the search on the atlassian site.


I am not suggesting that you not use the WAR install. That can be some compelling business reasons to do so. Even a strong business prefernece would be enough to motivate this.

My suggestion is that you seperate the upgrade and WAR migration into two steps.

First upgrade your standalone Confluence to the latest version. We have a document that outlines how to do this below.

Once you are at the latest version of Confluence you can focus on getting over to the WAR install. All you would need to do in this is install the WAR version and point the <confluence_install>/confluence/WEB-INF/classes/ at your existing <confluence_home> just as you would do for the upgrade.

Does that make more sense?

Yes, it makes sense. Rather than upgrade, I located the 4.1.6 EAR/WAR file to match our current installation and used that on the new server. Tomcat doesn't crash anymore, but still no joy. I deployed it using the Tomcat deployment manager (also tried it by putting the war file directly into the webapps directory), pointed the file to my confluence home directory - and I still get the "Configure database" Confluence setup page (it also asks for license info first). It's acting like a new install.

There's also the possibility that the status of the confluence.cfg.xml is not set to complete:


Can you attach the contents of confluence.cfg.xml here? (from the migrated Confluence Home Directory)

Here you go:

<?xml version="1.0" encoding="UTF-8"?>

<property name="admin.ui.allow.daily.backup.custom.location">false</property>
<property name="">false</property>
<property name="">false</property>
<property name="attachments.dir">${confluenceHome}/attachments</property>
<property name="confluence.license.hash"> ommitted </property>
<property name="confluence.license.message">ommitted</property>
<property name="">BTHW-SEQO-X2Z2-WLSW</property>
<property name="confluence.webapp.context.path"></property>
<property name="hibernate.c3p0.acquire_increment">1</property>
<property name="hibernate.c3p0.idle_test_period">100</property>
<property name="hibernate.c3p0.max_size">30</property>
<property name="hibernate.c3p0.max_statements">0</property>
<property name="hibernate.c3p0.min_size">0</property>
<property name="hibernate.c3p0.timeout">30</property>
<property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
<property name="hibernate.connection.isolation">2</property>
<property name="hibernate.connection.password">ommitted</property>
<property name="hibernate.connection.url">jdbc:postgresql://localhost:5432/confluence</property>
<property name="hibernate.connection.username">postgres</property>
<property name="hibernate.database.lower_non_ascii_supported">true</property>
<property name="hibernate.dialect">net.sf.hibernate.dialect.PostgreSQLDialect</property>
<property name="hibernate.setup">true</property>
<property name="lucene.index.dir">${confluenceHome}/index</property>
<property name="webwork.multipart.saveDir">${confluenceHome}/temp</property>

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,941 views 27 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you