Search the Confluence 4.1.x Documentation:

Index
Downloads (PDF, HTML & XML formats)
Other versions

This documentation relates to Confluence 4.1.x
If you are using an earlier version, please view the previous versions of the Confluence documentation and select the relevant version.
Skip to end of metadata
Go to start of metadata

This page describes how to move Confluence between physical servers. It is distinct from other functions. It does not cover database migration, application server migration, or upgrading. Atlassian suggests doing each of these steps separately. See also:

(warning) The information on this page does not apply to Confluence OnDemand.

How to Create a Test or Development Instance

Administrators may need to move a Confluence instance from one server to another for upgrades or downtime. This page tells you how to copy a Confluence instance from one server to another. For example, you may want to transfer your current production snapshot to a test server as permitted in the licence agreement.

(info) Development licenses are available for any Commercial or Academic license. Create one or contact Atlassian for help.

Avoid upgrades while transferring

If you are planning to switch databases, application servers or Confluence versions, firstly perform the application transfer in isolation, and test that it was successful before making other changes.

Transferring Confluence To Another Server Using The Same Operating System

If the operating systems on both servers are the same, then the home and install folders can be copied straight into an identical external database and user management setup.

  1. On the original server, create zips of the Confluence install and home directories. Copy the zips to the new server.
  2. On the new server, unzip the install and home directories. Windows users should avoid unzipping with the Windows built-in extractor, instead use Winzip or the free 7Zip.

    If you are changing the location of the home directory, open the Confluence install\confluence\WEB-INF\classes directory and edit confluence-init.properties by changing the line starting with 'confluence.home='.

  3. Modify the location of your war file if need be. If using Tomcat, this is likely in /Conf/Catalina/localhost. You'll want to make sure the docbase attribute is pointing to the right location.
  4. This next step is dependent on your database:

    1. Database configuration:
      1. For users of the internal database, the database content is stored inside the home directory. You should switch to an external database after the transfer is successful.
      2. For external databases stored on another server: change the user account or datasource permissions so that the new server has the same network access permissions as the original. Then confirm from the new server that the hostname can be resolved and is listening for database connections on the expected port.
      3. For external databases hosted locally (ie. localhost): on the original server, create a manual database backup using a native db dump backup tool. Copy the database backup to the new server.
    2. On the new server, install or upgrade the database version to match the original server.
    3. Import the database backup.
    4. Add a database user account with the same username and password as the original.
    5. Provide the user with the full access to the imported database.
    6. Use a database administration tool to confirm that the user can login from the localhost.
    7. To modify any database connection information, go to the Confluence home directory and edit confluence.cfg.xml. The connection URL is set under hibernate.connection.url. Ensure it does not point to your production database server.
    8. If you are using internal user management, skip this step. For users who have JIRA or LDAP integration, provide the new server with network or local access to the same hosts as the original. If this is a true test instance, set up a test of your JIRA instance or LDAP server so as not to disrupt production systems and change the server.xml or atlassian-user.xml files to point to the appropriate test servers. Note that it might be acceptable to use a production connection here, as users won't be logging on to the test system in high volume.
    9. If appropriate, make sure no emails are sent out from the test system.
    10. Start Confluence.
    11. Go to Administration > License Details and add your development license key. You can generate one at http://my.atlassian.com. There are more details in Getting a License for a Staging Environment.
    12. If you configured Confluence as a Windows service, repeat those instructions.
    13. Add your development license key.
  5. Some customers have experienced problems with Confluence's search functions after performing a migration, or that the content of their {recently-updated} macro is not being updated correctly. Errors in the atlassian-confluence.log file corroborate such problems. Hence, to avoid these issues, it is strongly recommended that you perform a rebuild of your content indices after performing a migration.

Transferring Confluence To Another Server Using a Different Operating System

Migrating from Windows to Linux

You will need to replace the backslash of the following in confluence.cfg.xml with forward slash:

    <property name="attachments.dir">${confluenceHome}/attachments</property>
    <property name="lucene.index.dir">${confluenceHome}/index</property>
    <property name="webwork.multipart.saveDir">${confluenceHome}/temp</property>

Using database tools (preferred option)

If you are using the Production backup strategy, follow these steps:

  1. Download the proper distribution (the same one you have from your original instance) from the Download Archive.
  2. Copy your Confluence home (not install) directory from your original server (even if it was a different OS).
  3. If you are changing the location of the home directory, open the Confluence install\confluence\WEB-INF\classes directory and edit confluence-init.properties by changing the line starting with 'confluence.home='.
  4. For external databases stored locally, on the original server, create a manual database backup using a native db dump backup tool.
  5. Copy the database backup to the new server.
  6. On the new server, install or upgrade the database version to match the original server.
  7. Import the database backup.
  8. Add a database user account with the same username and password as the original.
  9. Provide the user with the full access to the imported database.
  10. Use a database administration tool to confirm that the user can login from the localhost.
  11. To modify any database connection information, go to the Confluence home directory and edit confluence.cfg.xml. The connection URL is set under hibernate.connection.url. Ensure it does not point to your production database server.
  12. If you are using internal user management, skip this step. For users who have JIRA or LDAP integration, provide the new server with network or local access to the same hosts as the original.
  13. Copy server.xml, atlassian-user.xml, osuser.xml, any patches, and any other customized files velocity or properties files. If you are using internal user management, skip this step. For users who have JIRA or LDAP integration, provide the new server with network or local access to the same hosts as the original. If this is a true test instance, set up a test of your JIRA instance or LDAP server so as not to disrupt production systems and change the server.xml or atlassian-user.xml files to point to the appropriate test servers. Note that it might be acceptable to use a production connection here, as users won't be logging on to the test system in high volume.
  14. If appropriate, make sure no emails are sent out from the test system.
  15. Start Confluence.
  16. Go to Administration > License Details and add your development license key. You can generate one at http://my.atlassian.com. There are more details in Getting a License for a Staging Environment.
  17. If you configured Confluence as a Windows service, repeat those instructions.
  18. Add your development license key.
  19. Some customers have experienced problems with Confluence's search functions after performing a migration, or that the content of their {recently-updated} macro is not being updated correctly. Errors in the atlassian-confluence.log file corroborate such problems. Hence, to avoid these issues, it is strongly recommended that you perform a rebuild of your content indices after performing a migration.

Using XML data backups (only for small to medium sized installations)

If you're not yet using the Production backup strategy, you can migrate Confluence to a different server machine by creating an XML data backup as usual, and then importing that to Confluence on the new server.

  1. Create an XML data backup from Confluence as follows:
    1. Go to the Confluence 'Administration Console':

      • Choose Browse > Confluence Admin. The 'Administrator Access' login screen will be displayed.
      • Enter your password and click Confirm. You will be temporarily logged into a secure session to access the 'Administration Console'.
    2. Select Backup & Restore.
    3. Check the Backup Attachments option and click Backup.
  2. Identify the version of Confluence that you are currently using. This is displayed at the bottom of each Confluence page.
  3. Download Confluence to the new server. Get the version of Confluence that you identified above, but for the operating system of the new server. You may be using either the latest Confluence version, or an older version.
  4. Install Confluence on the new server.
  5. Go to Administration > License Details and add your development license key. You can generate a license at http://my.atlassian.com. You can find more details in Getting a License for a Staging Environment.
  6. Restore your XML data backup from Administration > Backup and Restore.
  7. If appropriate, make sure that no email contact can be made with the test system.
  8. Some customers have experienced problems with Confluence's search functions after performing a migration, or that the content of their {recently-updated} macro is not being updated correctly. Errors in the atlassian-confluence.log file corroborate such problems. Hence, to avoid these issues, it is strongly recommended that you rebuild your content indices after performing a migration.

Ensuring no contact with production systems

To ensure no contact with external systems, you will need to disable both inbound and outbound mail services.

  1. Disable global outbound mail by running the following database query:

  2. Disable space-level mail archiving by running the following database query:

Change 'SELECT' to 'DELETE' in the above queries once you are sure you want to remove the specified accounts.

Once this is done, you can start your test instance without any mails being sent or retrieved. Think carefully about other plugins which may access production systems (SQL macro, JIRA macro, etc.). If these write content, or create unwanted load on external systems, they should be disabled promptly after starting the test instance.

Blog post on Moving Confluence from Windows to Linux

Ricky Sheaves (calebscreek) has written an interesting blog post on Moving Confluence from Windows to (Ubuntu) Linux.

Merging instances

If you wish to merge two instances, you can consider using the remote import plugin. This plugin is currently unsupported. The supported method would be to export a space and then import each space one by one. The two instances of Confluence must be the same version.

Migrating from HTTPS to HTTP

You may want to migrate from a server secured by SSL to one which is not secured by SSL. For example, this may be useful if you are copying a Confluence instance from a production to a test site.

To migrate from HTTPS to HTTP, undo the HTTPS-specific settings that are described on this page: Adding SSL for Secure Logins and Page Security.

  1. Nov 03, 2008

    Hi,

    Do you know if it is possible to copy just a part of the the original Confluence instead of copying everything ( for example copying just new layouts that we develop) ?

    Also, can we copy stuff from the test environment to the original (again ... like for example layouts, templates, macros, etc) or can only "space's content" be copied?  

    Thanks! (smile)  

    1. Jan 14, 2009

      Hi Yoleidy,

      Please see the detailed doc below regarding Customising layouts in Confluence:

      You should be able to copy the customisation from instance A to instance B by performing a site backup and restore. All the customisations will be copying over.

      Regards,
      MG

  2. Mar 02, 2010

    Anonymous

    Is it possible to move a working development instance of confluence to another tomcat instance?  If so, how would one go about doing this?

    Thanks in advance.

    1. Mar 09, 2010

      Yes, this is possible. I assume that this is a migration within the same server - you may just as well follow the instructions provided in this page. In the nutshell:

      • If you need to move the Confluence installation to the other Tomcat, copy the Confluence webapp over
      • (Important) Make sure the webapp's confluence.home in confluence-init.properties is pointing to the existing Confluence Home Directory

      Hope that helps.

  3. Jun 01, 2010

    Anonymous

    Hi. Is it possible to migrate to new production environment (new hardware) with existing license

    key and then continuing to use current environment as development and test? How can I do it?

    1. Jun 02, 2010

      Hi,

      For your information, if you are a commercial license holder, you can actually obtain a free developer license for staging purpose. Please visit the link provided for instructions on how to get one.

      After you obtain the developer license, just change the license for your current environment to the developer license. You can do so by going to Confluence Admin then click License Details at your left panel.

      Regards,
      HengHwa

  4. Oct 26, 2010

    Just a point of clarification which is not immediately obvious.

    "Different Operating systems" really appears to mean "*nix and Windows". For example, I was successfully able to migrate our Confluence from a Solaris 10 Sparc box (different platform even!) to an Ubuntu Linux x86 box using the method described in "Transferring Confluence To Another Server Using The Same Operating System"

    The "Same Operating System" steps are much easier to do than the "Different Operating System" steps.

    Caveat: The process is probably not "supported" for the move I made, but (a) it worked, and (b) the Confluence .jar installation package tarball is the same for Solaris Sparc and Ubuntu x86 Linux, so there is no reason why it shouldn't work.

  5. Nov 09, 2010

    If you are moving from Windows to Linux you might want to make sure that case sensitivity is not causing your problem on your SQL restore.

    I added this to my /etc/mysql/my.cnf Below the mysqld basic settings and restarted my SQL.

    Previously I was getting the following error in my logs:

    'confluencedb.BANDANA' doesn't exist

  6. Jun 14, 2011

    Come on guys, your product is better then this, but the documentation here really, really needs some serious attention. I've spent the last two hours trying to move my Confluence application data from one set of application and database servers to a new set that are running on a different operating system (Windows to Linxu).

    In the section "Transferring Confluence To Another Server Using a Different Operating System", the directions don't even seem relevant. I don't see anything in the licensing portal about a development license key or a license for a staging environment.

    Since this isn't the same database I'm trying to follow the section sub-section "For XML backups (only for small to medium sized installations)" which is even worse! I can perform steps 1-3, but 4-6 aren't even available and I'm not able to get into my system to do step 7!

    I think the quality of your product is good, but this documentation really leaves a black mark on the quality of the company in my view. I know you guys are better then this.

    1. Aug 31, 2011

      To get a development license, please follow these instructions Getting a License for a Staging Environment (as linked from this page). I tested this process and was able to replicate the action with the current documentation.

      I also tested the XML import instructions with the current documentation and was able to carry out all of the steps.

      Please raise a support request at http://support.atlassian.com, where our support engineers will be able to get back to you quickly.

      I hope this helps.

      Best Regards,

      Edwin Dawson
      Technical Writing Team Leader
      Atlassian
      http://www.atlassian.com

  7. Sep 02, 2011

    Anonymous

    How about if I want to move my production instance to a new server?  This page really only discusses creating a testbed, which is not what i want to do.

    Can I use the same production license, and how will this affect me in respect to the SEN number and Server ID?

  8. Sep 23, 2011

    Anonymous

    do the groups get migrated automatically when moving to a new server?

  9. Oct 05, 2011

    Question - can I create the "dev" environment on the same server but with a different port #?  Any idea what I need to do differently?  Thanks!

  10. Oct 10, 2011

    Hi there,

    I am migrating Confluence 3.5.9 by your instruction and have two questions:

    1. We use JIRA integration for user management and have test JIRA instance, so we would like to change Confluence settings to point to the test server.
    Unfortunately, I could not find these settings in server.xml and could not find the file atlassian-user.xml at all :(
    So I deleted application link to production JIRA and created the new one to test JIRA and change user directiories.
    If my actions were correct, I think it would be better to change your instruction (or where I was wrong?)

    2. In paragraph "Transferring Confluence To Another Server Using The Same Operating System"
    steps 4.k and 4.m seems to be the same?