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

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

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
Community showcase
Published in Bitbucket

⭐ Calling all Bitbucket and DevOps experts: Special showcase opportunity ⭐

Hi, Bitbucket community! Are you a DevOps practitioner (or know one in your network)? Do you have DevOps tips, tricks, or learnings you'd like to share with the community? If so, we'd love to hea...

1,453 views 4 7
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