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 vote

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?

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

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 Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

24,004 views 26 12
Join discussion

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