Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bitbucket database migration failure

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

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

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
Community showcase
Published in Bitbucket

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

157 views 2 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you