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

This widget could not be displayed.

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 Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

297 views 2 4
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