How to move the database Confluence 4.3.3

I'm trying to move our Confluence database to another server. I've found a few pages with instructions, but most are directing me to edit XML files that do not exist in my installation. We're on 4.3.3. I'm not changing anything about the setup except the server that the database is on (moving from a remote server to the server that runs Confluence). Help is appreciated!

1 answer

1 accepted

Hi Karen,

There are two possible files that can store database connection parameters in Confluence, the default one is the confluence.cfg.xml, which is located into your Confluence home directory. This is how it looks like:

<?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="">B3WL-TF3W-IY98-YDPI</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">com.mysql.jdbc.Driver</property>
    <property name="hibernate.connection.isolation">2</property>
    <property name="hibernate.connection.password">confluence</property>
    <property name="hibernate.connection.url">jdbc:mysql://localhost/confluence?sessionVariables=storage_engine%3DInnoDB</property>
    <property name="hibernate.connection.username">confluence</property>
    <property name="hibernate.database.lower_non_ascii_supported">true</property>
    <property name="hibernate.dialect">com.atlassian.hibernate.dialect.MySQLDialect</property>
    <property name="hibernate.setup">true</property>
    <property name="lucene.index.dir">${confluenceHome}/index</property>
    <property name="webwork.multipart.saveDir">${confluenceHome}/temp</property>

The other possible file is the server.xml, which is located into your Confluence install directory, within the sub folder called conf. The server.xml file contain a lot of other settings, but the lines related to the database connection would look like this:

<Resource auth="Container" driverClassName="com.mysql.jdbc.Driver" maxActive="20" name="jdbc/ConfluenceDS" password="confluence" type="javax.sql.DataSource" url="jdbc:mysql://localhost:3306/confluence?useUnicode=true&characterEncoding=UTF8" username="confluence" validationQuery="select 1"/>

I hope this information has helped.


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...

370 views 20 10
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