How to move the shared-home folder in Confluence Data Center

Still need help?

The Atlassian Community is here for you.

Ask the community

Purpose

The shared-home folder in Confluence Data Center stores the Confluence attachments, backups, rendered previews, among other content. When migrating to a different disk or making changes to Confluence Data Center, you might want to update the location of your shared-home directory.


Solution

For this example, we will use /shared/home/old as the old path, and /shared/home/new as the new path. To update the shared-home folder:

  1. Shutdown Confluence
  2. Edit the confluence_home/confluence.cfg.xml and update this line

    <property name="confluence.cluster.home">/shared/home/old</property>
  3. Change that value to the new path: /shared/home/new
    (info) Make sure to do this for every node of Confluence, as each node has a local copy of this file
  4. Run this query on the database (this example is using PostgreSQL):

    update bandana
    set bandanavalue = REPLACE(bandanavalue, '<backupPath>/shared/home/old</backupPath>', '<backupPath>/shared/home/new</backupPath>')
    where bandanakey = 'atlassian.confluence.settings'
    and bandanacontext = '_GLOBAL';
    

    Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

  5. Copy any contents under:

    /shared/home/old
    
  6. And move them to:

    /shared/home/new
  7. Restart each node of Confluence

  8. Create an XML backup (Manually Backing Up the Site) and confirm that it is created under the new location
  9. Confirm your attachments are accessible from each node of Confluence




Last modified on May 13, 2019

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.