Forums

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

Migration of Stash to BitBucket on new server

Gecko Finance
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 30, 2018

Hello,

I am looking for some guidance on migrating from Stash v3.10.2 on an existing Windows server to a new Windows server running BitBucket v5.8.1. I have installed BitBucket on the new server already and matched all general settings between Stash/BitBucket.

The SQL database associated with the Stash v3.10.2 instance is on an SQL server which both servers have access to, the new instance of BitBucket is still using the out the box database for now.

Could someone please advise of the correct procedure migrating the old data into the new instance on the new server?

Am I better upgrading the existing server from Stash to BitBucket prior to migrating data?

Any help will be greatly appreciated.

Kind Regards


Craig

1 answer

0 votes
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 30, 2018

The only way to migrate the data is to upgrade your existing instance. You can do it in 2 ways.

1. Use the recommended installer approach to upgrade your existing Stash to Bitbucket Server latest version. Then move it to the new server

2. Use the manual approach to point the new Bitbucket installation to a copy of your old installations home folder and database

In both cases, Bitbucket will be upgraded with your existing data. Even in the case of #1, you will end up pointing the new server to a copy of the existing Home folder and DB but the upgrade would have already completed in the old server itself.

Given that you already installaed Bitbucket server in the new machine, #2 might be easier. See https://confluence.atlassian.com/bitbucketserver/upgrade-bitbucket-server-from-an-archive-file-779292682.html for more details.

Please make sure you test this before migrating the actual data. And make sure you have backup of the old instance, in case you need to revert back.

Gecko Finance
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 9, 2018

Hi Jobin

Thanks for that, can you please advise how I point the new install of BitBucket to the existing SQL database?

Keeping in mind my new installation does not have a bitbucket.properties file as it's still using the out the box database. Apparently I need to migrate the existing database to SQL before it create's the file, but I dont really need to migrate the existing database to SQL, as I already have an SQL DB I want to connect to. 

I have created a file named bitbucket.properties in the data folder of the home folder and restarted services. The file contains:

jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbc.url=jdbc:sqlserver://192.168.1.243:1433;databaseName=AtlassianStash;
jdbc.user=g****
jdbc.password=*****

Yet, when I start BitBucket it is still advising me to migrate to a database type other than internal.

What I have done so far:

1. Installed new instance of BitBucket on new server.


2. Backed up and restored the AtlassianStash database to the new SQL server. (old instance of Stash currently connected to it)

3. Moved the Home Folder to the new server in separate location from the installation directory. (path has changed from old server D:\SVN is not R:\BitBucket on new)

4.  Used the set-bitbucket-home.bat file to set the home directory of my new BitBucket installation to the home folder moved from the old server.

I think setting the SQL is the last piece of the puzzle.

Also just one more question, I assume I can rename or delete the default "R:\Atlassian\ApplicationData\Bitbucket" home folder created by the installation?

 Regards

Craig

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 10, 2018
Craig Turnbull
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 14, 2018

Hi Jobin

 

Thanks for that, I could not get BitBucket to pickup the new home folder or the bitbucket.properties file within, despite changing the system variable and editing/running the set home folder batch file. After moving the data I ended up running the upgrade to 5.10 and pointing it to the new directory. All seems to be working after that.

Thanks

Craig

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events