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

1 vote
Accepted answer

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
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

793 views 33 5
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