The Bitbucket Server backup directory cannot be located in Bitbucket Server home

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 executing the backup client, it fails with the exception below:

1 2 3 4 5 6 7 2014-09-08 13:27:10,195 INFO Initializing 2014-09-08 13:27:10,686 ERROR The application could not be started. An unexpected error prevented the Spring ApplicationContext from being created. Details of the error follow. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'backupHome' defined in class path resource [META-INF/spring/common-spring.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.atlassian.bitbucket.internal.backup.client.layout.DefaultBackupHome]: Constructor threw exception; nested exception is com.atlassian.bitbucket.internal.backup.client.BackupException: The Bitbucket Server backup directory (/opt/atlassian/bitbucket-home) cannot be located in Bitbucket Server home (/opt/atlassian/bitbucket-home). Please change the backup directory location and retry. at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:278) ~[spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1114) ~[spring-beans-4.0.5.RELEASE.jar:4.0.5.RELEASE] ... 12 more frames available in the log file

Cause

The configured backup.home directory is located under the bitbucket.home directory.

Resolution

Create the backup.home in a completely separate directory. For example, you can use /opt/atlassian/bitbucket-backup instead.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.