Bitbucket Migration

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

4 answers

1 accepted

0 votes

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.

 

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?

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,

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.

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?

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

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

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

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!

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?

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.

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

673 views 0 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot