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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Upgrading Bitbucket



I am in the process of upgrading to a new set of Bitbucket (all Centos7) servers. I am starting off by recreating the old server setup in the new one and then upgrading the version (4.13 > 5.9 or higher). I am using Postgres 9.2.23 right now and the plan is to move to 10+.

I have already moved the data from the old server to the new one and it starts up just fine.

I am trying to move the db into the new server with a .sql backup file and I am having no luck in completing this effort. 

Since this isn't working I'm considering the following:

  • Getting a .dump backup file created and trying to restore that into the new db instead of the .sql file.
  • Doing a db migration on the new server from the old db to the new db. I have concerns about this though. Will the old server have an interruption of service (how much)? Will the old server continue to operate after this migration?

I am really liking the migration option but I cannot simply change the service over permenantly until i have upgraded and tested everything on the new set up.


If you want to migrate the databases for bitbucket, you need to do the following;


  • shutdown the bitbucket instance
  • take the db (.sql) backup / dump from current db server
  • go to the new db server and restore .sql / dump file
  • go to bitbucket application server and file and change the database related info (DB host name, db name , user / password etc)
  • start the bitbucket instance - it will start with new db

Hi @devittward,

What @Shankar Asam _Appfire_ suggested is a valid starting point (Thanks!).

However, we always recommend to restore both the home directory and the database from a backup taken at the same time. This is to make sure that the data are 100% consistent.

The change of the jdbc url in the is still required and you want to always double check that this is done to avoid to upgrade the database of the current server by mistake.


We also have a guide that covers How to Migrate Bitbucket Server to another server, this contains various links to the necessary checks and prerequisites (e.g. Supported Platforms).


An alternative could be to backup the data from the current instance and restore them in the target one (see Data recovery and backups for options).



Caterina - Atlassian

This issue has been resolved. 

I installed Postgresql-9.5, then moved a restored a .dump version to the new server.

The bitbucket upgrades of a higher version did not workon start up. The error was that the table names were wrong, or that the configured database was not compatible. My solution was to incrementally upgrade starting with 5.0.5> 5.3.6 >5.5.5 > 5.8.3> 5.10.1 and 5.11.1. Sure this might be overkill but it was tired of the database errors.

The root cause was that the table names were not the same in the pre 5.x.x versions and threw an error each time I attempted to upgrade.

Perhaps once I upgraded to 5.0.5 I could have made a bigger jump but oh well. It is finished.

Hey @devittward,

An upgrade directly to the latest version is, in general, always possible. I'm not sure what happened exactly, but I'm glad it's all working now!



Thanks, I am getting ready to upgrade our version from V4.13 to V5.10.1 and was wondering if there would be any issues.  This answered my questions.


Log in or Sign up to comment
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,821 views 10 16
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you