How to create a cloned Confluence instance with a new server ID and application ID
Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.
To create a cloned Confluence test instance with a new server ID and application ID for staging environments with Jira and Confluence configured with an application link.
How it works/Use Case:
Test instances will often be cloned from existing production hosts using a snapshot from the host virtual machine. This duplication of the server ID can cause confusion and if there's an existing application link in production with Jira, the duplicated application ID will not allow for trusted application linking in the staging environment.
Before You Begin
Create virtual machine clones for both Jira and Confluence and restore them to a new host.
The cloned instance should use a different application ID. To achieve this, Confluence requires a new server ID and a new keystore entry.
Follow these steps:
- Shutdown the cloned instance(s)
- Generate a new server ID by installing a fresh, separate Confluence instance of the same version.
- Copy its server ID (shown in setup wizard) and delete the instance.
- Edit the <confluence-cloned-home-directory>/confluence.cfg.xml with the new server ID by updating the confluence.setup.server.id attribute with the copied server ID.
- Update the server ID in cloned Confluence instance's database. For example:
UPDATE bandana SET bandanavalue = '<string>ABCD-E1F2-GH3I-JK4L</string>' WHERE bandanakey = 'confluence.server.id'
5. Delete all of the existing rows in the KEYSTORE table:
DELETE FROM keystore WHERE alias LIKE '%confluence%'
6. Download and install the script from CONFSERVER-11074.
7. Restart the cloned instance
8. Run the script from CONFSERVER-11074 to re-initialize the KEYSTORE table. This should result in a new application ID for the cloned instance, found in the KEYSTORE table.
This should not only give you new server IDs but also new application IDs.