# Preparing for the migration

There are two parts of preparing for the migration:

1. [On-prem prepare steps](#on-premise-prepare-steps)
2. [Cloud-side preparation](#cloud-side-preparation)

It is essential that you follow the process carefully and not miss any of the steps. If at any time you run into problems, reach out to our [support team](https://metainf.atlassian.net/servicedesk/customer/portal/1) and send us as much information as possible, including screenshots and an explanation of what happened.

## On-premise prepare steps

#### 1. Download and install the latest version of Email This Issue.

{% hint style="danger" %}
**Important notice: The current recommended version for using the Automatic migration tool is 9.24.2.**

Unfortunately, at the moment, it’s not possible to reliably migrate from version 10.0.0 of the application.

If you have already upgraded to a later version, we recommend downgrading the application to version 9.24.2 before starting the migration.

Please note that if you have already created mail connections or OAuth credentials with [Grant flow (Application access)](https://docs.meta-inf.hu/email-this-issue/administration/mail-server-connections/microsoft-with-oauth2/microsoft-graph-api-with-oauth2/graph-api-with-client-credentials-grant-application-access) you will need to delete the connections and credentials before the downgrade.

Upgrading to version 10.0.4-GA or above doesn’t help in this case, because all Jira 11 compatible versions are currently blocked from the migration due to a problem on the Jira side.

If you wish you can signal to Atlassian that this also affects you here:\
<https://jira.atlassian.com/browse/MIG-2450>
{% endhint %}

#### 2. Remove any configuration that you don’t want to migrate to the cloud.

#### 3. Disable every Incoming Mail Connection.

{% hint style="warning" %}
After you start the migration, all new incoming emails (both created with Jira and/or with Email This Issue that you would process with Email This Issue on the On-prem version) and their processed data will not be migrated to the Cloud as the process is already running.
{% endhint %}

![Disabling Incoming Mail Connections created with Email This Issue on the On-Prem version](https://880912854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mf8H-oTE_fhOrUtfYrN-2724419853%2Fuploads%2FDpS0wUnWbJ8char3RFrx%2Fimage.png?alt=media\&token=e139f045-83c0-489e-9283-6fa7d4d07046)

If you have Incoming Mail Connection created with Jira it should be disabled as well.

#### 4. Clean up your Incoming Mail Queue

Check if there are any important emails in the **Filtered out** or **Failed** incoming mail queues. If you need those emails, make sure to requeue them before the migration.

After this, wait for the **New** and **Being processed** queues to become empty. These steps assure that these emails will be migrated as well.

![Incoming mail queue before cleanup](https://880912854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mf8H-oTE_fhOrUtfYrN-2724419853%2Fuploads%2FugRDAkcBdqa8VNF7DLLt%2Fimage.png?alt=media\&token=f99d5e6f-6642-4adb-9a68-131fbf2e4597)

#### 5. Prepare incoming mail accounts

All emails that you do not want to be processed later in Cloud should be moved out or removed from the mail account folder that is used by Email This Issue for incoming emails. By default, this folder is called “INBOX”. To check if your Incoming Mail Connections are using custom folder settings you should look for the **Folder** option:

![Incoming mail connection - Folder option](https://880912854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mf8H-oTE_fhOrUtfYrN-2724419853%2Fuploads%2FbHltSrK9i4HxtTUwrevT%2Fimage.png?alt=media\&token=f28907b1-4379-4c05-97a5-ede74dad6cb8)

{% hint style="warning" %}
After the migration when incoming mail connections are enabled in the Cloud, all emails will be downloaded from the mail accounts regardless of being read or unread. If the mail account folders used by the connections are not cleared, it may lead to duplicate issues and comments.
{% endhint %}

#### 6. Set email audit log migration period

Optionally, you can set the time frame from when the audit log items should be migrated. The default time frame is to migrate from the last 1 month.

1. Navigate to the **Email Log** in the Email This Issue administration settings
2. Click on **Migration** then select the time frame that fits your needs from the **Migrate from the last** select list.\
   ![](https://880912854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mf8H-oTE_fhOrUtfYrN-2724419853%2Fuploads%2FOOPZqkmlqYZPeURD8iOk%2FScreenshot%202022-08-24%20at%2010.21.51.png?alt=media\&token=765fe84b-d70b-411c-a218-8a485df8642d)
3. Click on **Save settings**

## Cloud-side preparation <a href="#cloud-side-preparation" id="cloud-side-preparation"></a>

{% hint style="warning" %}
The migration tool will delete all existing data from Email This Issue Cloud by the end of the migration.

All these preparations are required to avoid data loss or duplication on the Cloud side of Email This Issue.
{% endhint %}

#### 1. Make sure Email This Issue is installed and has a valid license on your target Cloud instance.

#### 2. Disable every Incoming Email Connection

{% hint style="warning" %}
New emails will not be downloaded while this migration is in progress. Otherwise, these emails could be lost.
{% endhint %}

<figure><img src="https://880912854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mf8H-oTE_fhOrUtfYrN-2724419853%2Fuploads%2FA7Ew3LQRff8laewof6Oi%2Fmigration_2.png?alt=media&#x26;token=56593df9-9e8a-4b0d-8600-8d189a24420b" alt=""><figcaption><p>Disabling incoming mail connections in the Cloud version</p></figcaption></figure>

#### 3. Clean up your Incoming Mail Queue

Check if there are any important emails in the **Skipped** or **Error** incoming mail queues. If you need those emails, make sure to requeue them before the migration.

After this, wait for the **Active** and **Processing** queues to become empty. These steps assure that these emails will be migrated as well.

<figure><img src="https://880912854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mf8H-oTE_fhOrUtfYrN-2724419853%2Fuploads%2FkIdAY6bwkLOF73rP3ivT%2Fmigration_1.png?alt=media&#x26;token=b972327e-1338-42a9-8aad-7a0bd651c2ad" alt=""><figcaption><p>Incoming mail queue before cleanup</p></figcaption></figure>

#### 4. Prepare incoming mail accounts

All emails that you do not want to be processed in Cloud should be moved out or removed from the mail account folder that is used by Email This Issue for incoming emails. By default, this folder is called “INBOX”. To check if your Incoming Mail Connections are using custom folder settings you should look for the **Folder** option:

![Incoming mail connection - Folder option](https://880912854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mf8H-oTE_fhOrUtfYrN-2724419853%2Fuploads%2FBTCO0xAfLwZfBgvJ3tTp%2Fimage.png?alt=media\&token=6a022867-01ee-445c-94e9-aa46f512ed17)

#### **5.** Enable data migration to your Cloud instance in Email This Issue

{% hint style="info" %}
This process can take a few minutes to complete, and there is no confirmation of its success.
{% endhint %}

To enable data migration, navigate to Email This Issue **Administration** - **Migration Options**:

<figure><img src="https://880912854-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mf8H-oTE_fhOrUtfYrN-2724419853%2Fuploads%2F1CFbqVDv5SczK4RZHazO%2Fmigration_3.png?alt=media&#x26;token=a2be3b7d-c58a-46e6-bfc7-35a327fb4be0" alt=""><figcaption><p>Enabling data migration setting in Cloud</p></figcaption></figure>
