Resolve duplicate email addresses when migrating to the Cloud

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Data Center のみ - この記事は、Data Center プラットフォームのアトラシアン製品にのみ適用されます。

要約

When migrating from Server or Data Center to Cloud, the Migration Assistant apps run a set of pre-checks to verify the source instance doesn’t include users with duplicated email addresses. Since an email address is the primary identifier in Cloud, it must be unique. Migrated content from Jira and Confluence will be linked to users in Cloud based on their email addresses.

Identify

Use one of the following ways to identify users with duplicated email addresses:

Identify users automatically in the Jira Cloud Migration Assistant

You can use the Migration Assistant to assess your users and identify those who share the same email address. You can complete this assessment at any time before migration.

To identify users with duplicated addresses:

  1. Open the Jira Cloud Migration Assistant.

  2. In the Assess and prepare users section, select Begin assessing. You’ll be moved to the page with empty results.

  3. To start the assessment, select Begin assessing.

Once the assessment is complete, you’ll see the results, including invalid email addresses and duplicated email accounts, like in the following example:

For more information about the assessment and next steps, see Assess and prepare your users for migration.

Identify users in the Confluence Cloud Migration Assistant

For Confluence, the assessment mentioned above is not available. However, you can create a new migration plan and run the pre-checks to scan the source instance. If there are any duplicated email addresses, you will see the following:

Identify users in the database

You can also identify users with invalid email addresses by running the following query in your database.

NOTE: The SQL query may need to be adjusted depending on the database. Also, the query makes the assumption that the column email_address and lower_email_address have consistent data.
select lower_email_address,directory_id,count(*) from cwd_user group by 1,2 having count(lower_email_address) > 1;

ソリューション

You can either fix the email addresses manually in your source user directory or choose one of the automatic options from the Migration Assistant to update the users during migration.

Manually create valid and unique emails and update them in your user directory

You can manually create email addresses that are valid and unique (e.g. user@atlassian.com) and update them in your user directory, be it an LDAP Server or your Server or Data Center instance.

To update email addresses of users in your Server or Data Center instance:

  1. Select Administration > User management.

  2. Find the user you’d like to update using the filters at the top of the page.

  3. Select Edit next to the username.

  4. Update the email address, and select Update.

Automatically update users during migration (Jira only)

This option is only available in the Jira Cloud Migration Assistant.

After you complete the assessment described in the Identify users automatically in the Migration Assistant section, the Migration Assistant will let you fix duplicated email addresses as the next step (after fixing invalid email addresses. Note that if you choose this approach, we won’t update users in your source directory, but only the ones we create in Cloud during migration.

To automatically fix duplicated email addresses:

  1. In the Migration Assistant, view the results in the Assess and prepare users section.

  2. When viewing the results, select Fix invalid emails. Invalid emails are the first step you need to go through before you get to fixing the duplicates.

  3. When viewing the Fix invalid email addresses page, select Fix duplicated emails.

  4. Choose one of the options to fix duplicated emails. For more information on each option, see Fix duplicated email addresses.

Manually update users in the database

You can update users directory in the database. These queries will update the email address of every user whose address is duplicated, using the following format: dupeuser-<id>@domain.com.

Make sure to adjust the queries by adding a specific domain or changing the format. Once you’re done, either restart your Server or Data Center instance. 


Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

Postgres

update cwd_user 
set email_address = 'dupeuser-' || id || '@domain.com', 
    lower_email_address = 'dupeuser-' || id || '@domain.com'
    where lower_email_address in (select lower_email_address from cwd_user 
group by lower_email_address having count(lower_email_address) > 1);

MySQL

UPDATE cwd_user
SET email_address = CONCAT('dupeuser-',id,'@domain.com'),
    lower_email_address = CONCAT('dupeuser-',id,'@domain.com')
    WHERE lower_email_address in (select lower_email_address from (select lower_email_address from cwd_user
group by lower_email_address having count(lower_email_address) > 1) as t);

MS SQL Server

UPDATE cwd_user
SET email_address = CONCAT('dupeuser-',id,'@domain.com'),
    lower_email_address = CONCAT('dupeuser-',id,'@domain.com')
    WHERE lower_email_address in (select lower_email_address from cwd_user 
group by lower_email_address having count(lower_email_address) > 1);

Oracle

UPDATE cwd_user
SET email_address = 'dupeuser-' || id || '@domain.com',
    lower_email_address = 'dupeuser-' || id || '@domain.com'
    WHERE  lower_email_address in (select lower_email_address from cwd_user 
group by lower_email_address having count(lower_email_address) > 1);
最終更新日: 2022 年 12 月 8 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.