Both old and new directory exist

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

After starting Bitbucket Server, 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.

    • 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 Both old and new directory exist for more information

Cause

In Bitbucket Server 3.2, the following locations under the Bitbucket home directory have moved while all the other directories remain the same:

Before Bitbucket Server 3.2

From Bitbucket Server 3.2 onwards

config

shared/config

data

shared/data

plugins/installed-plugins

shared/plugins/installed-plugins

bitbucket.properties

shared/bitbucket.properties

If you are hitting this message, it means:

  • A version of Bitbucket Server older than 3.2 pointing to $BITBUCKET_HOME with the "old" directory structure was running in the server.

  • A new version of Bitbucket Server (3.2+) was installed which used the existing $BITBUCKET_HOME. The instance started correctly and the $BITBUCKET_HOME directory structure was upgraded.

  • Bitbucket Server was re-started but the older binary (before 3.2) was used. This older version of Bitbucket Server was unable to find the expected directory structure in $BITBUCKET_HOME and so it recreated it. Bitbucket Server looked like a fresh / blank installation.

  • Bitbucket Server 3.2+ was started and it found both the old and the new directory structure in $BITBUCKET_HOME. An error page was displayed to inform that the $BITBUCKET_HOME needs to be fixed.

    For example, if the $BITBUCKET_HOME/data and $BITBUCKET_HOME/shared/data directories both existed, Bitbucket would fail to start and will show a message that it cannot move $BITBUCKET_HOME/data to $BITBUCKET_HOME/shared/data. Please check the directories and see if one is present by mistake.

Updated on May 22, 2025

Still need help?

The Atlassian Community is here for you.