Recovery Mode

Jira recovery mode puts the isntance of Jira in a maintanence mode and enable the use of the "recovery_admin" account.
This account is granted all global permissions required for administrative changes such as system detail editing,
permission granting or user password changes.

When to Use Recovery Mode.

We can use recovery mode for the following situations:

  • Re-gaining access to locked accounts.
    If we've been locked out of an account for some reason, or if we need to change log in credentials following a Cloud to Server migration.

  • Allocating hidden user groups to specific users.
    In some cases, the "system-administrator" user group can be hidden if this has already been set up on a cloud version.
    The recovery account can bypass this and assign users to it.

Enabling Recovery Mode

Start by sshing into the container for the desired Jira. I'll be demonstrating this on the Admin Jira.

sshContainer admin-jira

Then do sudo bash to set yourself as root.

We need to add a line to the setenv.sh file found in /opt/atlassian/jira/bin.

Do vim /opt/atlassian/jira/bin/setenv.sh to open this file up.
You should see something similar to the below screen shot.

Terminal Vim

Hit Insert to begin editing the document. Where it says JVM_SUPPORT_RECOMMENDED_ARGS= add the following system property:
-Datlassian.recovery.password=<your-password>

Replace <your-password> with a password of your choosing.

Recovery System Property

Hit ESC to stop editing the document, enter :wq (write quit) and press Enter to save the changes. This will close the document.

WQ

In the same terminal window, do systemctl restart jira to restart the Jira instance with the new system property enabled.

Head over to your Jira in the web browser to see if this has worked.

Logging in as Recovery Account

When you head over to your Jira now, you should see the following notification on the log in screen.
Recovery Notification

As mentioned in this notification, you're now able to log in as recovery_admin. The password for this account is the one you set when adding the system property to the setenv.sh file. Enter the recovery_admin username and password to
log in.

Disabling Recovery Mode

When you're ready to disable recovery mode, simply head back into the setenv.sh file using the vim command and delete the system property we added. It should look like the below when you've removed it.

Disable Recovery

Once you've saved and exited the file using :wq, use the systemctl restart jira command again to restart the Jira instance, then head back over to Jira in your web browser to see if it's been reverted back to normal.