Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Change Bitbucket base url when restoring DIY backup

Claus Nielsen
Contributor
December 18, 2017

Hi,

We are running Bitbucket Server 5.6.1 and just introduced using the DIY backup concept. (https://bitbucket.org/atlassianlabs/atlassian-bitbucket-diy-backup)

As part of restoring a backup to our test environment we would like to change the base url. 

I'm not able to find a REST resource for doing so and only able to find setup.baseUrl which will work on a "fresh" install. (this isen't as it a restore of a existing one)

Is this possible using the REST API or by setting a property in the bitbucket.properties file ? 

 

Thanks in advance :-)

 

Kind regards

Claus

1 answer

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 21, 2017

Hi Claus! The base URL can be adjusted via the "BITBUCKET_URL" parameter of the bitbucket.diy-backup.vars.sh file, you can find this at Using Bitbucket Server DIY backup.

Hope that helps!

Ana

Claus Nielsen
Contributor
December 21, 2017

Hi Ana - the link you supply doesn't work. I guess it is this one right ? https://confluence.atlassian.com/bitbucketserver/using-bitbucket-server-diy-backup-776640056.html

Like Steffen Opel _Utoolity_ likes this
Claus Nielsen
Contributor
December 21, 2017

Using that property doesn't work. I restore our production environment to our test environment once a day - and the BITBUCKET_URL is set correctly in bitbucket.diy-backup.vars.sh when restoring. But the url in Bitbucket test instance is set to the production one.... maybe this is saved in the DB ?

Robert Hencke
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 11, 2018

Hi @Claus Nielsen

We had this problem, too.  Same situation.

As far as we could determine, this must be done in the database.

Before launching your restored instance, you can do:

UPDATE app_property SET prop_value = 'http://new-url-here:7990' WHERE prop_key = 'instance.url'

That's not exactly a supported method, as far as I know, but I couldn't figure out another way to make it happen.

Like # people like this
Claus Nielsen
Contributor
January 11, 2018

Hi @Robert Hencke - Thanks a lot for your input, I will use your approach from now on !

Thanks !

Thakor_ Prachi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 21, 2022

Hi @Robert Hencke - It Works

Ansari
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 31, 2022

any idea how to clear the base ssh url using database ? I could not find the right table for it ?

Thansk in advance :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events