Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket database migration failure

jmarko June 29, 2021

Hi,
I have new/empty bitbucket installation on new server, which I want to connect to database which is not empty, but has data of bitbucket that we used in past. 
When I tried to connect it with this external database(Settings->Database->Migrate database) I get an error:
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.

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.migration.DefaultMigrationService.validateConfiguration(DefaultMigrationService.java:85)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	...

Do I really need new DB? Am I missing something? All I want is the bitbucket with the same data as it was in application on different computer. DB was copied from SQL server 2012 to SQL server 2017, but I do not believe this is a problem.
Bitbucket.properties file doesn't create.


Please help   

 

1 answer

0 votes
Christian Glockner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 29, 2021

Hi,

If you want to re-use an existing database you would also need a backup of the Bitbucket home directory from the same time, and when you have that, the bitbucket.properties file from that should be pointing to the database, and that's where you could point to the existing database.

Cheers,

Christian

Premier Support Engineer

Atlassian

jmarko June 29, 2021

First, thank you for quick answer.
If I understand correctly we cannot use old/migrated database in new bitbucket installation? The thing is we need to move database from MSSQL 2012 server to 2017 because of Jira update. 
So the best option will be that we first migrate database to MSSQL 2017 and than just change bitbucket.properties configuration to 2017 database? Is that simple? 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events