error when starting new bitbucket server
Asked by jcathey87:

as a preface, I'm not super knowledgeable on Bitbucket or Linux.

The issue is that I am currently trying to start up a new Bitbucket server. With Windows support ending we are leaving our SQL database in place but shutting down the old bitbucket windows server and starting a Linux server. I followed the guide at (<https://confluence.atlassian.com/bitbucketserver/migrate-bitbucket-server-from-windows-to-linux-1128304336.html>). When I open the web page to setup the new server I give it all the proper information but get the following 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.

If you continue having issues, [get in touch with our support team](https://support.atlassian.com/) 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:227)	com.atlassian.stash.internal.migration.DefaultDatabaseMigrationService.validateConfiguration(DefaultDatabaseMigrationService.java:85)	sun.reflect.GeneratedMethodAccessor745.invoke(Unknown Source)	...
```

I've clearly missed something or it would have worked but I cant figure out where I went wrong. I can provide any additional information you might need. Thank you for the help.


Answers:
author: Charlie Misonne
body: Hi [@jcathey87](/t5/user/viewprofilepage/user-id/5511990)welcome to the Atlassian community!
> When I open the web page to setup the new server I give it all the proper information but get the following error.

So you instlalled the new Bitbucket instance on Linux and start it right away?

If the database settings are not in the bitbucket.properties file yet Bitbucket will show you the setup wizard in the browser and that one is only meant for empty installations.

Step 5 under **On target Linux Server** says to update the bitbucket.properties. In step 6 you start Bitbucket and you should not be getting the setup wizard.

I don't know whether you moved the database to another DB server too but make sure you have the right settings in bitbucket.properties.

Hope this helps!

comments: author: jcathey87
body: [@Charlie Misonne](/t5/user/viewprofilepage/user-id/502263) I believe this was the issue. I had already started bitbucket when it prompted during the install. I then shut it down and adjusted the properties file. I'm a bit confused on some wording in the instructions am I supposed to copy the bitbucket directory from windows to linux first? or is changing the properties file enough for the new server to connect and have the information it needs. We are not moving the database it is on a seperate server that isnt being touched in this process.

Thank you so much for the help.


author: Charlie Misonne
body: You need to copy the so called "Bitbucket home" directory containing all the git repositories, the bitbucket.properties, ... And you don't have to copy the install directory because you perform a fresh install on the target server.

Copying the home directory is explained in more detail on [Migrating Bitbucket Data Center to another server](https://confluence.atlassian.com/bitbucketserver/migrating-bitbucket-data-center-to-another-server-776640406.html#MigratingBitbucketDataCentertoanotherserver-MigratingBitbucketServertoanotherserver-3.MoveBitbucketServertoadifferentmachine) (step 3)

If you only adapt the bitbucket.properties file to point to your database but you don't copy the contents of bitbucket home you will not have any of the git repositories (they'll probably be empty). Source Code (GIT) is kept on disk, not in the database.

Does this answer your question? :-)


author: jcathey87
body: Thank you so much. You have really cleared this up for me.


author: Charlie Misonne
body: Glad I could help!


Tags: bitbucket-data-center

bitbucket-server

data-center

migration