Hi,
First of all, a bit of information / background.
We are running Bitbucket 5.10 with a starter user license currently (looking to expand in the near feature).
First, we migrated the Bitbucket database from being an internal one, to an external server with MS sql 2014 installed though the migration wizard. Everything went smooth this time around.
But now we are looking to migrate it from the 2014 installation, to another external server with MS sql 2016 installed instead. But we keep running into this error, even if we re-create the database on the new server, with no information in it at all.
Error message:
Bitbucket could not be migrated to the new database. Some data may have already been written to the new database leaving it in an inconsistent state. You will need to empty or recreate the new database before trying again.
Bitbucket could not be migrated to the new database. Some data may have already been written to the new database leaving it in an inconsistent state. You will need to empty or recreate the new database before trying again. com.atlassian.stash.internal.maintenance.migration.DatabaseMigrationTask.convertToMigrationException(DatabaseMigrationTask.java:86) com.atlassian.stash.internal.maintenance.migration.DatabaseMigrationTask.run(DatabaseMigrationTask.java:51) com.atlassian.stash.internal.maintenance.DefaultMaintenanceTaskMonitor.run(DefaultMaintenanceTaskMonitor.java:212) ... A backup file could not be created. com.atlassian.stash.internal.maintenance.backup.BackupPhase.run(BackupPhase.java:77) com.atlassian.stash.internal.maintenance.CompositeMaintenanceTask$Step.run(CompositeMaintenanceTask.java:130) com.atlassian.stash.internal.maintenance.CompositeMaintenanceTask.run(CompositeMaintenanceTask.java:69) ... Backup of Bitbucket configuration failed. com.atlassian.stash.internal.maintenance.backup.ConfigurationBackupStep.run(ConfigurationBackupStep.java:71) com.atlassian.stash.internal.maintenance.CompositeMaintenanceTask$Step.run(CompositeMaintenanceTask.java:130) com.atlassian.stash.internal.maintenance.CompositeMaintenanceTask.run(CompositeMaintenanceTask.java:69) ... C:\Atlassian\ApplicationData\Bitbucket\shared\bitbucket.properties (Access is denied) java.io.FileInputStream.open0(Native Method) java.io.FileInputStream.open(Unknown Source) java.io.FileInputStream.<init>(Unknown Source) ...
Any help is much appriciated!! :)
While seeing the error I think the issue with the permission because if you have been created an empty database while migrating the bitbucket server data then it should not throw this error.
The bitbucket.properties file will contain the database details like name, Url..etc please make sure this file should have appropriate access.
Hi Yogesh,
I wouldn't doubt it could be a permission issue, kinda what i was thinking as well.
But i'm a bit clueless to who i need to assaign the access to the .properties file,
Should it be the user on Bitbucket?
The user atlbitbucket that runs the services?
or an administetiv Active Directory user with access to the databases?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually, the file contains the details of the database so while migrating data the database details should be able to read.
Just give the full permission to .properties file and the location where it contains.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Yogesh,
Thanks for the help resolveing this issue.
It is now working :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
C:\Atlassian\ApplicationData\Bitbucket\shared\bitbucket.properties
is not accessible. Make sure it is accessible by the user executing the process and retry.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Danyal,
Thanks for your reply.
Should the user that makes the migration have the access to this file? as that is an internal Bitbucket administrator, that is only created in Bitbucket.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, the user (windows/AD) running the migration should have access to the *.properties file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Danyal
Thanks for the help resolveing this issue.
It is now working :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.