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"?>

<confluence-configuration>
  <setupStep>complete</setupStep>
  <setupType>custom</setupType>
  <buildNumber>3393</buildNumber>
  <properties>
    <property name="admin.ui.allow.daily.backup.custom.location">false</property>
    <property name="admin.ui.allow.manual.backup.download">false</property>
    <property name="admin.ui.allow.site.support.email">false</property>
    <property name="attachments.dir">${confluenceHome}/attachments</property>
    <property name="confluence.license.hash">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</property>
    <property name="confluence.license.message">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</property>
    <property name="confluence.setup.server.id">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>
  </properties>
</confluence-configuration>

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.

Cheers

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,146 views 20 14
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