Bitbucket Server Backup Client fails and throws cannot be read error
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
The Bitbucket Server Backup Client does not complete the creation of a backup.
The following appears in the atlassian-sbc-YYYY-MM-DD-MMSS.log
1
2
3
4
ERROR [main] c.a.b.i.backup.client.BackupMain A backup could not be created
com.atlassian.bitbucket.internal.backup.client.BackupException: File <BITBUCKET_HOME>/<path_to_a_file> cannot be read
at com.atlassian.bitbucket.internal.backup.client.layout.DefaultApplicationHome.addFileEntries(DefaultApplicationHome.groovy:120) ~[bitbucket-backup-core-3.0.0.jar:na]
at com.atlassian.bitbucket.internal.backup.client.layout.DefaultApplicationHome.archive(DefaultApplicationHome.groovy:104) ~[bitbucket-backup-core-3.0.0.jar:na]
Cause
When the Backup Client accesses the files to be backed up and listed at a previous step of the process, the files are not available anymore because they have been removed by a separate process.
For example, a crontab process to create older log files deleted the files.
This is particularly relevant if the Backup Client requires a significant amount of time to run.
Resolution
Avoid the files accessed by the Bitbucket Server Backup Client to be moved or removed while the Backup Client is running.
Was this helpful?