The target database contains tables whose names collide with Bitbucket's tables. Please migrate to a

I am trying to upgrade from bitbucket 4.7.1 to 5.4.0 using the TAR.GZ package and when importing the existing database I am seeing following error. Please help!!

Note that I have followed this doc and tried using existing BITBUCKET_HOME as well as using a empty directory as BITBUCKET_HOME https://confluence.atlassian.com/bitbucketserver/bitbucket-server-upgrade-guide-776640551.html 

The target database contains tables whose names collide with Bitbucket's tables. Please migrate to a clean, empty database. For more information about creating a database for use with Bitbucket, please refer to the Bitbucket documentation.

If you continue having issues, get in touch with our support team and we'll help get you up and running.

Hide details
The target database contains tables whose names collide with Bitbucket's tables. Please migrate to a clean, empty database. For more information about creating a database for use with Bitbucket, please refer to the Bitbucket documentation.
	com.atlassian.stash.internal.db.DefaultDatabaseManager.validateConfiguration(DefaultDatabaseManager.java:226)
	com.atlassian.stash.internal.db.DefaultDatabaseManager.prepareDatabase(DefaultDatabaseManager.java:183)
	com.atlassian.stash.internal.maintenance.SpringMaintenanceTaskFactory.setupTask(SpringMaintenanceTaskFactory.java:151)
	...

 

1 answer

This widget could not be displayed.

Hi Lokesh,

What do you mean with "importing the existing database"? During a Bitbucket Server upgrade all you do is point BITBUCKET_HOME to your existing home directory and start Bitbucket Server - it will perform the upgrade automatically if it detects a home directory from an older version.

Cheers,

Christian

Premier Support Engineer

Atlassian

Hi Christian,

 

What I meant was I did point bitbucket to existing BITBUCKET_HOME and tried to bring it up and it took me to the setup wizard which I wasn't expecting. So what went wrong here?

If you also read the question I posted carefully you will notice that I did try to point to existing BITBUCKET_HOME which didn't help.

Hi Lokesh,

Seeing the setup wizard is indeed unexpected - this suggests that Bitbucket is either not able to find the home directory in the location specified or there may be permission issues.

Cheers,

Christian

Premier Support Engineer

Atlassian

Thanks for your response Christian! To rule out the possibility that bitbucket is not able to find the home directory I deliberately renamed bitbucket.properties to something else which causes bitbucket unable to start. As far as permission issues goes bitbucket is able to a access all the files in the home directory otherwise it won't even startup. How do I debug this further in case something else is missing at our end?

I also tried to upgrade from 4.7.1 to 4.14.10 and didn't face any issue. All I did was just untar the package and start bitbucket and everything worked magically :) so I am wondering what's different for 5.4.0

The properties file holds things Bitbucket needs, including the database connection.  That's why it thinks you've got a new install,

Hi Lokesh,

Where and how did you define BITBUCKET_HOME? The upgrade guide for using the archive file tells you to do it in <Bitbucket Server installation directory> /bin/set-bitbucket-home.sh

Otherwise, is using the installer as an alternative to using the archive file an option?

Cheers,

Christian

Premier Support Engineer

Atlassian

Hi Christian,

 

The BITBUCKET_HOME is defined as an environment variable. Using the installer is not an option because of the way our system is setup. I can try to setup using the set-bitbucket-home.sh script but I don't know what sense will it make because of the fact that properties file is being read by bitbucket which suggests that it is able to find the home directory correctly and also doesn't has any permission issues (otherwise it cannot read the file).

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,315 views 8 11
Read article

Atlassian User Groups

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!

Find my local user group

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

Groups near you