Administrators can revert a Confluence instance that uses JIRA for user management back to internal user management. With few users, it is easier to manually recreate the JIRA users and groups in Confluence. For more users, migrate JIRA users and groups into the Confluence database instead.

Option A - Manually Recreate Users In Confluence

This option is too time consuming for hundreds or thousands of users. After completing the reversion, links to users who created or updated Confluence content may go to error screens.

To manually recreate the users, you must first have an instance of Confluence with internal user management and your data.

  • If you have made limited customisations to Confluence and migrating would be desirable - follow the upgrade guide and import your data to a new installation.
  • Alternatively, if you have made extensive customisations or do not wish to migrate - go to delegating user management to JIRA and remove your JIRA user management by undoing the instructions in revese order. These steps are specific to your instance so cannot be covered here.

Then manually create JIRA's groups and users in Confluence. If you have assigned permissions in Confluence to a group which exists in JIRA, you must create a group in Confluence with the same name. If a user who exists in JIRA has created content or has had permissions assigned to them, you must also create that user in Confluence.

Option B - Transfer JIRA Users & Groups To Confluence

This option manually migrates JIRA users into the Confluence database, but requires knowledge of SQL.

Users not using mySQL

Users of non-mySQL databases must be experienced enough to modify the SQL to work in their database as examples are provided for mySQL only. If you adapt the SQL to another database, please consider posting the SQL you used to the comments.

Users of Confluence 2.0 or older

Pre-Confluence 2.0 users may need to modify the instructions to your older schema, or upgrade Confluence. For example, on Confluence 2.1.5 and older, SQL references to the property table must be updated to be called OS_PROPERTYENTRY in all upper-case.

Stage One - Create Backups

何か不具合があった場合にデータを復元する手段として、バックアップを作成しておくことが重要です。

  1. From Confluence, create a full XML backup including attachments.

  2. Confluence を停止します。

  3. Take a backup copy of the Confluence home and install directories.

  4. Repeat the above steps for JIRA.

  5. From your mySQL admin tool, create a database backup for the JIRA and Confluence databases.

Stage Two - Replace Confluence User Management

Replace the Confluence user and group permissions with JIRA by transferring table content. The SQL provided is specific to mySQL and must be modifed for other databases. For each SQL statement, do a find and replace on the JIRA and Confluence table names to your table names. In the examples, they are called confluence224 and jira364.

  1. Login to a DBA tool that can execute SQL on your DB.

  2. Erase user and group content from the Confluence DB:
    delete from confluence224.os_propertyentry where entity_name='OSUser_user';
    delete from confluence224.os_user_group;
    delete from confluence224.os_group;
    delete from confluence224.os_user;
    
  3. Copy JIRA's groupbase table into Confluence's os_group table:
    insert into confluence224.os_group (id, groupname)
    select * 
    from jira364.groupbase;
    
  4. Copy JIRA's userbase table into Confluence's os_user table:
    insert into confluence224.os_user (id, username, passwd)
    select * 
    from jira364.userbase;
    
  5. Copy JIRA's membershipbase table into Confluence's os_user_group table.
    insert into confluence224.os_user_group (group_id, user_id)
    select distinct groupbase.id as "group_id", userbase.id as "user_id"
    from jira364.groupbase, jira364.membershipbase, jira364.userbase
    where membershipbase.user_name = userbase.username and membershipbase.group_name = groupbase.groupname;
    
  6. Merge relevant content from JIRA's propertyentry and propertystring tables into Confluence's os_propertyentry table. Some versions of SQL use "0" instead of "false" for boolean values.
    insert into confluence224.os_propertyentry (entity_name, entity_id, entity_key, key_type, boolean_val, double_val, string_val, text_val, long_val, int_val, date_val) 
    select 'OSUser_user', propertyentry.entity_id, propertyentry.property_key, 5, false, 0, propertystring.propertyvalue, '', 0, 0, null
    from jira364.propertyentry, jira364.propertystring
    where propertyentry.entity_name='OSUser' and propertyentry.id=propertystring.id;
    

Stage Three - Revert To Local Management

  • If you have made limited customisations to Confluence and migrating would be desirable - Install a new instance of Confluence using the upgrade guide and use Method 1 to import your updated database.
  • Alternatively, if you have made extensive customisations or do not wish to migrate - go to Delegating User Management to JIRA and remove your JIRA user management by undoing the instructions in revese order. These steps are specific to your instance so cannot be covered here.

Done! Note that the original administrator may not display their groups correctly, however their groups are still present.