Forums

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

Restore Bitbucket to a new server

Jonny Polivka
Contributor
June 21, 2018

Hello:

Looking for some direction, I need to migrate our Bitbucket service to a new Windows server but not sure on what route to take.  I've read the documentation on Migrating Bitbucket Server to another server but I don't have the need to move the DB itself.  (DB is hosted on a separate MSSQL server.)

Reading the section in Restoring Bitbucket Server to use a newly created DB might be what i'm looking for but I have some questions on it.

  • Creating a new DB.  Would it be just as good to Drop the tables in the existing DB (after a successful backup) instead of creating a new one?
  • Or is there a better way to do a recovery to a new machine using the same DB?

JP

 

 

1 answer

1 vote
Bhushan Nagaraj
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 21, 2018

@Jonny Polivka

Bitbucket Server (or any Atlassian application in general) has 3 components:

  1. Install Folder - where you install Bitbucket
  2. Home folder - where you save data such as repositories, logs, etc
  3. Database - where BB connects to the database

In you case, you will be moving install folder and the home folder to a new server.

  1. Backup your existing home, install and database
  2. Shutdown you current instance
  3. Copy your install folder and home folder to the new server
  4. Start the instance from the new server

If you are also moving the database to the new server, use the below steps.

  1. Backup your existing home, install and database
  2. Shutdown you current instance
  3. Copy your install folder and home folder to the new server
  4. Move your database to the new server
  5. Update the config file in the home folder on the new server, to point to the new database server. You will have o update the jdbc.driver, jdbc.url. jdbc.user, jdbc.password properties. Refer to https://confluence.atlassian.com/bitbucketserver/bitbucket-server-config-properties-776640155.html
  6. Start the instance from the new server

Hope that helps. Let me know if you have any further questions.

Jonny Polivka
Contributor
June 26, 2018

Thanks Bhushan.

Between steps 2 and 3, should I install the same version of Bitbucket on the new server and then do the copy from the old one?

Bhushan Nagaraj
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 26, 2018

@Jonny Polivka, yes they have to be the same version. If you are planning on upgrading to a newer version, I recommend doing that as a separate step.

1. Complete your server migration to the same version

2. Allow the users to use the system for a couple of week to ensure it is stable

3. Plan your upgrade to new version

Hope that helps.

Jonny Polivka
Contributor
July 26, 2018

Update:

I was successful moving Bitbucket to a new server while keeping the same database.  Steps I took. (This on a Windows Server VM)

  1. Backup existing server using the Backup Client
  2. Shutdown Bitbucket / Elasticsearch services
  3. Install Bitbucket on new server. 
    1. Use same version and install / home folder locations as existing.
    2. Don't start the services.
  4. Copy install and home folder over the new server's install and home folders.
  5. Configure SSL settings 
  6. Start the new server instance
  7. Done

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events