Confluence Data Center で共有ホーム フォルダを移動する方法
目的
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.
Finding the shared home for your Confluence application
The location of your shared-home folder can be found in your <confluence-home>/confluence.cfg.xml
file in the confluence.cluster.home
property.
The location of the Confluence home directory is defined when you install Confluence. This location is stored in the confluence-init.properties
file, which is located in the confluence/WEB-INF/classes
directory of your Confluence Installation directory. When Confluence is running you can find the location of the home directory in General Configuration > System Information > Confluence Information - Confluence Home. >
ソリューション
For this example, we will use /OLD_HOME/shared/
as the old path, and /NEW_HOME/shared/
as the new path. To update the shared-home folder:
- Confluence をシャットダウンします。
Edit the
confluence_home/confluence.cfg.xml
and update the following line:<property name="confluence.cluster.home">/OLD_HOME/shared</property>
This property for DC instance would be available if Confluence DC is running in cluster mode only.
- Change that value to the new path:
/NEW_HOME/shared/
Make sure to do this for every node of Confluence, as each node has a local copy of this file Run the following query and look for <backupPath>...</backupPath> tag:
select BANDANAVALUE from BANDANA where BANDANACONTEXT = '_GLOBAL' and BANDANAKEY = 'atlassian.confluence.settings';
Run the following UPDATE statement on the database (this example is for PostgreSQL):
update BANDANA set BANDANAVALUE = REPLACE(BANDANAVALUE, '<backupPath>OLD_BACKUP_PATH</backupPath>', '<backupPath>/NEW_HOME/shared/backups</backupPath>'); where BANDANACONTEXT = '_GLOBAL' and BANDANAKEY = 'atlassian.confluence.settings';
データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。
Copy any contents under the previous shared-home folder to the new location:
cp -R /OLD_HOME/shared/ /NEW_HOME/shared/
Restart All the Confluence nodes
Once all the steps are completed, perform the following verifications to check that the new folder is in use:
- Confluence の各ノードから添付ファイルにアクセス可能であることを確認します
- Create an XML backup (Back up a Site) and confirm that it is created under the new location.
If the behaviour is not the expected, please review the solution/workaround stated in - CONFSERVER-53451Getting issue details... STATUS
If you prefer to modify the backup location from your Confluence UI and specific a different location (outside the shared-home directory), you can follow the steps outlined in Configuring Backups > Enabling Backup Path Configuration