Upgrading your Bitbucket Server home directory for Bitbucket Server 3.2 manually
症状
After upgrading from an older version of Bitbucket Server to Bitbucket Server 3.2, you see the following error:
A fatal error has occurred
The following problem occurred which prevents Atlassian Bitbucket Server from starting correctly:
- The Bitbucket home directory could not be upgraded automatically.
Slightly different screen
If you were directed here for a slightly different screen:
A fatal error has occurred
The following problem occurred which prevents Atlassian Bitbucket Server from starting correctly:
- The Bitbucket home directory could not be upgraded automatically.
- Both old '/data/bitbucket-home/config' and new '/data/bitbucket-home/shared/config' exist.
- Both old '/data/bitbucket-home/data' and new '/data/bitbucket-home/shared/data' exist.
- Both old '/data/bitbucket-home/plugins/installed-plugins' and new '/data/bitbucket-home/shared/plugins/installed-plugins' exist.
- Both old '/data/bitbucket-home/data/repositories' and new '/data/bitbucket-home/shared/data/repositories' exist.
Please refer to Upgrading your Bitbucket Server home directory for Bitbucket Server 3.2 manually for more information
Please make sure you review the KB below instead:
原因
In Bitbucket Server 3.2, the following locations under the Bitbucket home directory have moved:
Before Bitbucket Server 3.2 | Bitbucket Server 3.2 |
---|---|
config | shared/config |
data | shared/data |
plugins/installed-plugins | shared/plugins/installed-plugins |
bitbucket.properties | shared/bitbucket.properties |
Other locations remain the same.
In most installations, Bitbucket Server 3.2 is able to perform these moves automatically and transparently. But if you have:
- mounted parts of your Bitbucket home directory from different devices,
- replaced some directories in your Bitbucket home directory with relative symbolic links, or
- tried to run an older version of Bitbucket Server with a Bitbucket home directory that's already in the Bitbucket Server 3.2 format
then Bitbucket Server 3.2 can't perform the upgrade automatically.
ソリューション
To manually upgrade the home directory, shut down Bitbucket Server, and move the folders using a command prompt window. It is recommended to do this interactively to see any errors or warnings reported by your system's mv
/move
command and resolve them appropriately.
cd ${BITBUCKET_HOME}
mkdir -p shared/plugins
mv -i config data bitbucket.properties shared/
mv -i plugins/installed-plugins shared/plugins/
cd %BITBUCKET_HOME%
mkdir shared\plugins
move /-Y config shared\
move /-Y data shared\
move /-Y bitbucket.properties shared\
move /-Y plugins\installed-plugins shared\plugins\
Then restart Bitbucket Server!