Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bitbucket Migration

Jason Ashplant February 16, 2017

I am planning a Bitbucket ver 4.7.1 migration hosted on a Windows server. The database is hosted on an external Oracle schema and will move to a new Oracle schema, all server data needs to be maintained. I have two questions:

1. I plan to migrate from Windows OS to Linux, can this be confirmed this is supported noting that the home drive path changes are required for Linux.

2. When using the database migration wizard can it be confirmed the data is copied from the original database to the new database and not moved. The reason being is we want to test the migration process prior to doing a production migration.

Thanks

Jason

5 answers

1 accepted

1 vote
Answer accepted
Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 16, 2017

1. I plan to migrate from Windows OS to Linux, can this be confirmed this is supported noting that the home drive path changes are required for Linux.

When Bitbucket first starts up on Linux, it'll detect that the BITBUCKET_HOME directory has changed and will update it's configuration accordingly.

2. When using the database migration wizard can it be confirmed the data is copied from the original database to the new database and not moved. The reason being is we want to test the migration process prior to doing a production migration.

That is correct. The database migration copies the data to the new database and leaves the original database intact.

 

Jason Ashplant February 16, 2017

In relation to the answer for number one, are you confirming the OS move from Windows to Linux is supported and all data can be maintained with a server move?

Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 16, 2017

Migrating to a different OS is supported. However, you need to ensure that you copy the contents of the BITBUCKET_HOME to the new os (Linux in your case) at a time where no writes are happening. If you don't, you may end up with partial object files in your git repositories, which can lead to corruptions.

One easy way to do it is to create a backup using the backup client and restoring the backup to the target OS and the target database. The backup client puts the server in maintenance mode and creates a consistent backup of the filesystem and the database.

Note that the backup client cannot be used for clustered installations,

Jason Ashplant March 10, 2017

I've successfully done a test migration using migration wizard. One of the questions I've been asked is there a method to stagger a migration to a new server. The idea being to export a single project and repositories one at time over a longer period to manage risk.

0 votes
Vicente Martinez Navarro June 7, 2023

Hello,

Is it possible to change the bitbucket and bitbucket pipeline from one Atlassian account to another Atlassian Cloud account without losing data?

Thank you

0 votes
Jason Ashplant February 8, 2018

I suspect this is related to bitbucket.properties file. Check the content to see what database it is pointing to. Also did you choose Install a new Bitbucket instance.

0 votes
Jason Ashplant December 12, 2017

These are the steps I took

1. Stop service take database backup, copy of home

2. start service, migrate the database

3. stop the service on ori server as it is now pointing at new database

4. copy home directory to new destination

5. install Bitbucket on new server, configure to point to new home and migrated database

Jeremy Flint December 13, 2017

Ah I got it. So you used the original install as the starting point rather than doing the install on the new server first.

Thanks!

Jeremy Flint February 1, 2018

Ok, So i have done the following:

  • Migrated database to Postgres on new Linux server
  • stopped service on origin server (Windows)
  • Copied the home directory using pscp from Windows to Linux
  • Installed bitbucket on new Linux server.

When I try to run the setup in the browser, an point the database to the migrated copy, it yells at me about bitbucket tables already in there. How do I get this to use the migrated database?

Alex Comerford April 13, 2018

Did you resolve this issue? I have updated the home directory in the config file as well but it isn't seeing my database config in the properties file but is asking me to set up a new database

0 votes
Jeremy Flint December 5, 2017

So a couple of questions as I am planning a Windows to Linux migration myself.

1. Did you use the Backup Client or just manually migrate the home folder to the new server?

2. How did you migrate the database?

Jason Ashplant December 6, 2017

1. I used PSCP to transfer from a Windows client to Linux

  • pscp -r -v D:\source\ username@destination:/tmp

2. I used the Migrate Database wizard -

  • Go to settings, database, migrate database, add target database credentials, test database migration wizard

Jason

Jeremy Flint December 11, 2017

Did you have to move the home directory from /tmp to another place before running the database migration?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events