Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Bitbucket Server and Database Restore



I am trying to restore a existing Bitbucket server and database to a new Bitbucket and database server. Essentially, I would like to test some backups of our existing Bitbucket server.


I have currently loaded up a new Redhat VM to have the new Bitbucket and Postgres Database installed on it. I have got a backup copy of the Bitbucket Home Directory and our Postgres Database backup. 

 I am not sure what the next steps are in order to perform a new Server and Database restore. Is anyone able to provide any input or a step by step guide? 


I have reviewed the following however it does not seem to apply to my Scenario as I want to restore my current BB server and BB database to a whole new BB server and new BB database. 


1 answer

1 accepted

0 votes
Answer accepted

Hi Khang,

As you are using the Home Directory archive and DB dump I would first install the same versions of Bitbucket and Postgres on your new VM.

Next overwrite the new Bitbucket Home Directory with your backup.

Create a new database in Postgres, you can find details on this here depending on your version:

Now Import the DB backup into the new database.

Update (<Bitbucket home directory>/shared) so it uses the new DB and url settings etc.

See Step 4:

Ensure permissions on the restored home directory are correct.

At this point Bitbucket should now start and have the data from the source Bitbucket.

There can be more to this such as any bespoke config in the previous install directory. The Proxy/SSL/Network setup.

Hopefully that helps


Thanks for providing the guide. What i've done is clone our existing psotgres database server and loaded up a brand new Bitbucket server. 

I installed the Bitbucket service and pointed the database location to go to our cloned database. 

Copied all the bitbucket home directory over to the new bitbucket server and it looks like the restore process went well.

Thank you and all looks to be working now. 

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events