Bitbucket Server Backup fails due to an invalid home directory
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
Problem
An attempt to create a backup using the Bitbucket Server Backup Client fails and the following appears in the <path/to/backup/client>/log/atlassian-sbc-YYYY-MM-DD-HHMM.log
:
1
2
3
4
ERROR [main] c.a.b.i.backup.client.BackupMain A backup could not be created. Reason: The configured BITBUCKET_HOME, <path/to/bitbucket_home/folder>, does not appear to be a valid home directory. Creating a backup requires direct access to the home directory for the running instance to allow it to interact with the repositories.
com.atlassian.bitbucket.internal.backup.client.BackupException: The configured BITBUCKET_HOME, <path/to/bitbucket_home/folder>, does not appear to be a valid home directory. Creating a backup requires direct access to the home directory for the running instance to allow it to interact with the repositories.
at com.atlassian.bitbucket.internal.backup.client.layout.DefaultApplicationHome.verify(DefaultApplicationHome.groovy:82) ~[bitbucket-backup-core-2.0.1.jar:na]
at com.atlassian.bitbucket.internal.backup.client.DefaultBackupClient.doBackup(DefaultBackupClient.groovy:49) ~[bitbucket-backup-client.jar:2.0.1]
Cause
Cause #1:The specified path for the BITBUCKET_HOME
or the bitbucket.home
variable (for the example above <path/to/bitbucket_home/folder>
) is not valid.
Cause #2:The BITBUCKET_HOME
needs to be directly accessible by the backup client
⚠️ It is important to differentiate between the Bitbucket Home directory and the Bitbucket installation directory. This public document can be used as a reference.
Resolution
Resolution #1
To resolve this issue, there are 2 ways of specifying the bitbucket.home
property. The details of each one of the options are described on the document below:
Option 1
Use the command line and pass the -Dbitbucket.home=</correct/path/to/bitbucket_home/folder>
argument.
For a complete sample working command line refer to document above.
Option 2
Define the bitbucket.home
variable by editing the default backup-config.properties
file and changing it into </correct/path/to/bitbucket_home/folder>
.
Resolution #2
Please run the backup client on the machine where Bitbucket server is running or mount the BITBUCKET_HOME
volume on the remote host with read access.
Was this helpful?