Upgrading your Bitbucket Server home directory for Bitbucket Server 3.2 manually

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

 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:

Cause

In Bitbucket Server 3.2, the following locations under the Bitbucket home directory have moved:

Before Bitbucket Server 3.2Bitbucket Server 3.2
configshared/config
datashared/data
plugins/installed-pluginsshared/plugins/installed-plugins
bitbucket.propertiesshared/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. 

Resolution

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.

Linux/MacOS
cd ${BITBUCKET_HOME}
mkdir -p shared/plugins
mv -i config data bitbucket.properties shared/
mv -i plugins/installed-plugins shared/plugins/
Windows
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!

Last modified on Feb 19, 2016

Was this helpful?

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