I've recently upgraded from Stash to Bitbucket, carefully following all the Atlassian migration notes. I even followed the instructions on how to connect to an external MySQL database, expecting to use the migration wizard to move our old stash database to the shiny new MySQL Bitbucket database. But I've done too much manually and Bitbucket is already using the (empty) MySQL database and the embedded one is not available to be migrated.
Please could someone advise me as to which configuration file(s) I need to edit to undo the partial manual migration, so that I can use the migration wizard to do it properly?
Or is there some way I can tell the migration wizard to go back to using the embedded database (I didn't recognise it in any of the target DB options)?
Before making any suggestions, please allow me to ask a few questions to clarify this further:
My plan now is to try to restore the MySQL 5.5 Stash DB and see if I can get the migration wizard to move that to the new MySQL 5.6 Bitbucket DB. I suspect that I've done something very wrong with the MySQL migration at some point.
(The easy answer to my original question is to remove the database configuration lines from the bitbucket.properties file.)
The actual answer is to remove the database configuration lines from the Bitbucket Server config properties file, specifically:
Without these settings Bitbucket doesn't have an external database to connect to and automatically falls back to using the internal HSQL database.
However, in my scenario, this was not the case, there was no HSQL database to fall back on; I had been misled into thinking that it wasn't using the MySQL database by invalid back-up files (incorrect port number specified in the back-up script).
The solution for me was to start an instance of the old MySQL server temporarily, using the data that was still lying around on the drive from before the original Stash to Bitbucket migration. Another temporary modification of the
bitbucket.properties file to point it at the old version of MySQL, with the
my.ini file edited so that it had a different port from the new MySQL server. I then had to drop the Bitbucket database from the new server and re-create it, because it had picked up empty tables from the failed migration. I re-started Bitbucket and used the Migration Wizard to migrate the database from the old version of MySQL to the new one, stopped the old MySQL and, to my great relief, the new Bitbucket configuration works with the new MySQL database. Win!
I've also fixed and tested the back-up scripts, so no more self-inflicted nightmares, and fixed the application links between JIRA and Bitbucket. I can even see all my repositories and clone, pull, push from a remote. Now all I need is for one of the other team members to tell me everything else I've missed.
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs