Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Lokesh Pathak October 2, 2017

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

0 votes
Christian Glockner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 3, 2017

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

Lokesh Pathak October 3, 2017

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?

Lokesh Pathak October 3, 2017

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.

Christian Glockner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 3, 2017

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

Lokesh Pathak October 3, 2017

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?

Lokesh Pathak October 3, 2017

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

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 3, 2017

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

Christian Glockner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 3, 2017

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

Lokesh Pathak October 3, 2017

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
TAGS
AUG Leaders

Atlassian Community Events