Confluence 3.x upgrade fails due to failed attachment migration
Upgrading to Confluence 3.0.x fails with the following exception:
FATAL [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: java.lang.RuntimeException: The attachment migration could not be completed since files already exist in the attachments directory blocking those that need to be created. ... Caused by: java.lang.RuntimeException: The attachment migration could not be completed since files already exist in the attachments directory blocking those that need to be created.
The attachments directory contains files or directories which the upgrade task wants to create. That is, a top level directory called 'ver003' containing directories or files with names containing up to 3 digits (e.g. 1, 213).
Typical scenario is the upgrade failed, then was rolled back to whatever version you were using (this however does not remove the "ver003" folder if it has been created in the previous upgrade attempt). When upgrading to Confluence 3.x again, Confluence discovers that the new attachment file structure has already exist and throw the exception. Refer to Hierarchical File System Attachments Storage for technical information.
To resolve this problem,
- Confluence をシャットダウンします。
- Make a backup of your existing Confluence Home directory, just in case.
- Restore your old copy of the Confluence Home directory.
- Make sure that
'ver003'folder does not exist in Confluence home directory (
Make sure that the (
<confluence home folder>/attachments/folder contains the old attachments directory structure. Eg.
<confluence home>/attachments/<pageid>/<attachment id>/1
If they do not exist then your instance will not have any attachments.
- Restart Confluence 3.0.x and check the
atlassian-confluence.logfile for any error.
To run the attachment migration process manually, log in to Confluence as an admin and point your browser to the URL