Changing Server ID for Bitbucket Server Cloned Instances
This page tells you how to obtain a new Server ID to use in a cloned instance of Bitbucket Server.
Note that Server IDs generally need to be changed for Application Links. Track progress at https://ecosystem.atlassian.net/browse/APL-629.
If you would like to change the server ID on your cloned instance, you will need to acquire a new server ID for your test environment by installing a fresh version of Bitbucket Server on the new server.
- Install a new, temporary instance of Bitbucket Server. Make sure the installation points to a new empty home directory.
- Start the new, temporary Bitbucket Server instance.
On the Wizard
- Choose Internal Database
- Extract the Server ID of the new installation by clicking 'Next'The 'Server ID' of your cloned instance is stored in your database and can be verified as below:
select * from app_property;
This will return something like this:
select * from app_property; +-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | prop_key | prop_value | +-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | instance.name | Bitbucket Server | | instance.url | http://webserver64.acme.com:8080/bitbucket-webapp-1.3 | | license | Your License here | | server.id | Your Server ID here | | setup.completed | true | +-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
In order to change the value of your Bitbucket Server instance please stop your cloned instance. For multi-node Data Center instances, all nodes should be stopped. For further info, refer to Start and stop Bitbucket.
Using the the value of the
server.id
obtained on step #3, run this query on your cloned instance's DB:update app_property set prop_value = '<ID>' where prop_key = 'server.id';
You need to change <ID> in the above query with the new server id obtained on step #3. The format is 4 sets of 4 capitalized alpha numeric characters separated by hyphens. Example: BA8J-RYK8-ABC4-KK8N
The query above is valid for both MySQL and Postgres, you may need to update it according to the database available in your instance.
- Restart your Bitbucket Server test instance. Restart all nodes for Data Center instances with multiple nodes. For further info, refer to Start and stop Bitbucket.