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
4,363,612
Community Members
 
Community Events
168
Community Groups

Bitbucket Server and Database Restore

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

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

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

Atlassian Community Events