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

Bitbucket Server and Database Restore

Khang Pham December 9, 2021

Hi,

 

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 https://confluence.atlassian.com/bitbucketserver/bitbucket-server-backup-client-776640064.html 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
Support Team [Clearvision]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2021

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: https://confluence.atlassian.com/bitbucketserver/connect-bitbucket-to-postgresql-776640389.html

Now Import the DB backup into the new database.

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

See Step 4: https://confluence.atlassian.com/bitbucketserver/migrating-bitbucket-server-to-another-server-776640406.html

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

Khang Pham December 19, 2021

Hi,

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
DEPLOYMENT TYPE
SERVER
VERSION
6.10
TAGS
AUG Leaders

Atlassian Community Events