Hybrid migration

A hybrid environment is where your on-premises Exchange server is synced with Office 365. CodeTwo migration software can be successfully used for scenarios that involve migrating data from or to such an environment.

What is a hybrid migration?

A hybrid migration applies to all hybrid environments with on-premises Exchange server and Exchange Online deployed and their Active Directories synchronized. This migration type assumes that some data is stored on-premises, and the rest in the cloud. The hybrid migration can also be used to gradually migrate all your data to the cloud, maintaining a hybrid environment for an unspecified time. Thanks to this, employees whose mailboxes are both in the cloud and on-premises have access to shared GAL (Global Address List), calendars, tasks, etc. Technically, this type of migration can follow the steps described in articles dedicated to a cutover or staged migration, depending on the amount of data that is to be migrated. However, due to the use of AD sync tools and the fact you may need to connect to target servers located both on-premises and in the cloud, some additional steps need to be included.

How to perform the hybrid migration in CodeTwo Exchange Migration

Migrating within a hybrid environment

Important

This scenario assumes that you are using Azure Active Directory Connect or similar AD synchronization tool to synchronize data between your on-premises environment and Office 365. Before you begin configuring a migration job in CodeTwo software, you need to make sure the msExchMailboxGuid attribute is not synchronized between these two environments. Learn more on how to exclude the msExchMailboxGuid attribute from being synchronized in our Knowledge Base article.

Keep also in mind that in hybrid environments you cannot have public folders in both Exchange on-prem and Office 365 at the same time. That is why migrating public folders in this scenario is not supported

  1. Open the migration job wizard by clicking Create a new migration job on the How to start card (Dashboard tab). Select Exchange Server and click OK.

    Migrating to Office 365

    If you want to migrate data in the opposite direction, you need to use CodeTwo Exchange Migration instead. For steps on how to migrate from Office 365 to on-premises Exchange in a hybrid environment, check out the corresponding article in the program’s user manual.

  2. Enter a unique name that will let you quickly identify the migration job.
  3. In the next step, select your source Exchange server from the Source server drop-down list. If you haven’t configured any connections yet, click Add new source connection instead. You can learn more on how to connect to on-premises Exchange here.
  4. Select mailboxes you want to migrate or leave the All Office 365 users / All Active Directory users option in the box. Since, by default, the program also suggests migrating public folders, you need to exclude them from the migration job by selecting Public Folders and clicking Remove.
  5. In the Target mailboxes step, select your Office 365 tenant or click Add new target connection in the Target server drop-down list to configure a new target server connection.
  6. In the next step, click Match mailboxes to open a new window, where you need to match the mailboxes on your on-premises server with respective ones in Office 365. The quickest way to do this is to use the automatching feature that compares the Active Directory attributes between the source and target server mailboxes. To take advantage of that feature, select all mailboxes (by pressing Ctrl+A) or only individual ones (press Ctrl to select them one by one, or Shift to select two or more rows) and click Automatch. If necessary, you can configure the matching parameters and try the automatching again, or even provide the email address manually. If you need to create mailbox-enabled users on your target server first, you can do so in the program, too.

    Warning

    If you are migrating to Office 365 Germany, you need to manually create users in Office 365 admin center and assign them licenses.

    Once you’ve matched all your mailboxes, click Save to apply your configuration. You can now close the Match mailboxes window.
  7. Setting up the scheduler in the next step is optional. If you don’t want the migration job to run 24/7, click Enable scheduler and configure the time frames during which the program will automatically start and stop the migration process. If you leave the checkbox unselected, you will have to start and stop the migration job manually (see step 12 below).
  8. In the Time filter step, you can decide to migrate all times or just those created/modified before or after a specific date. Learn more on how to set up the time filter.
  9. The Folder filter allows you to migrate only specific folder types to Office 365, leaving other items in your on-premises environment. To do so, simply select the checkboxes next to those folder types that you want to include in the migration process. For more information on how the folder filer works, refer to this article.
  10. In the Advanced settings step, there are some additional options that you can adjust, if necessary, or leave at their default values.
  11. In the final step of the wizard, Job summary, you can verify if you have configured the migration job according to your needs. If so, click Finish.
  12. To start the migration job, go to the Jobs tab, select your migration job, and click Start. If you have enabled and configured the scheduler (see step 7 above), you don’t have to do anything – the program will start the job automatically, according to your settings.

Once the migration is completed, it is recommended to run rescan. This feature will check if any new items appeared on the source server and migrate them to the target one. If necessary, you also need to configure your domain to route emails to your target server.

Migrating to a hybrid environment

Important

Migrating to a hybrid environment assumes that you will be migrating some of the data to an on-premises Exchange server and some to Office 365. To be able to do so, you need to use two programs: CodeTwo Exchange Migration and CodeTwo Office 365 Migration.

  1. Open the migration job wizard by clicking Create a new migration job on the How to start card (Dashboard tab). Select your source server and click OK.
  2. Enter a unique name that will let you quickly identify the migration job.
  3. In the next step, select your source Exchange server, Office 365 tenant, or IMAP server from the Source server drop-down list. If you haven’t configured any connections yet, click Add new source connection instead and configure the connection according to the source server of your choice:
    1. on-premises Exchange server
    2. Office 365 (Exchange Online)
    3. IMAP server

    Warning

    When configuring a connection to a source Office 365 tenant, make sure to enter the admin's primary email address from the *.onmicrosoft.com / *.onmicrosoft.de domain in the Admin account step. Otherwise, you will encounter problems if you transfer the domain from your source server to the target one during the migration.

    When you’re migrating from an IMAP server, you will not be able to continue the migration job at all once you change the domain on your source server.

  4. By default, the program will migrate the mailboxes of all users in your Active Directory and public folders. If you want to exclude, for example, public folders from this migration job, select Public Folders and click Remove. Also, if you want to select specific mailboxes to be migrated, refer to this article to learn how to do so.
  5. Depending on the program you are using, in the Target mailboxes step, you need to select your target Office 365 tenant. You can also click Add new target connection in the Target server drop-down list to configure a new target connection. To do so, refer to this article if you are using CodeTwo Office 365 Migration, or this one if you are configuring the migration job in CodeTwo Exchange Migration.
  6. In the next step, click Match mailboxes to open a new window, where you need to match the mailboxes on your source server with respective ones on the target server. The quickest way to do this is to use the automatching feature that compares the Active Directory attributes between the source and target server mailboxes. To take advantage of that feature, select all mailboxes (by pressing Ctrl+A) or only individual ones (press Ctrl to select them one by one, or Shift to select two or more rows) and click Automatch. If necessary, you can configure the matching parameters and try the automatching again, or even provide the email address manually. If you need to create mailbox-enabled users on your target server first, you can do so in the program, too.

    Warning

    If you are migrating to Office 365 Germany, you need to manually create users in Office 365 admin center and assign them licenses.

    Once you’ve matched all your mailboxes, click Save to apply your configuration. You can now close the Match mailboxes window.
  7. Setting up the scheduler in the next step is optional. If you don’t want the migration job to run 24/7, click Enable scheduler and configure the time frames during which the program will automatically start and stop the migration process. If you leave the checkbox unselected, you will have to start and stop the migration job manually (see step 12 below).
  8. In the Time filter step, you can decide to migrate all times or just those created/modified before or after a specific date. Learn more on how to set up the time filter.
  9. The Folder filter allows you to migrate only specific folder types to your target server. Remember to set up different filters in different programs. For example, when configuring a migration job in CodeTwo Exchange Migration, select checkboxes next to Emails and Tasks only, and in CodeTwo Office 365 Migration – next to Contacts, Calendars, and Notes. For more information on how the folder filer works, refer to this article.
  10. In the Advanced settings step, there are some additional options that you can adjust, if necessary, or leave at their default values.
  11. In the final step of the wizard, Job summary, you can verify if you have configured the migration job according to your needs. If so, click Finish.
  12. To start the migration job, go to the Jobs tab, select your migration job, and click Start. If you have enabled and configured the scheduler (see step 7 above), you don’t have to do anything – the program will start the job automatically, according to your settings.

Once completed, configure a second migration job in the second program, following the same steps. This time, you can select other users or decide to migrate public folders (step 4), match different mailboxes (step 6), or apply a different folder filer (step 9).

Post-migration activities

If applicable, once the migration is finished, you need to change MX records via your domain host to enable mail flow to the new server. Until these changes propagate, you can still receive emails on your old server. Therefore, first make sure that the MX records are updated, and then perform the following steps in both CodeTwo Exchange Migration and Code Two Office 365 Migration:

  1. Reconfigure the source and/or target connections if you have changed the domain in either of them.
  2. Go to the Jobs tab and select your migration job.
  3. Select all mailboxes (press Ctrl+A), and click Refresh email addresses on the menu.

    Warning

    The refresh functionality is not available when you’re migrating from an IMAP server.

  4. Check the results window. In case of any errors, refer to this article for more information.
  5. Once all email addresses have been refreshed, click Rescan on the menu. This will migrate any new emails that were sent you your old server during the migration or when the changes to the MX records were propagating.
  6. If after the migration Outlook doesn't connect to your new mail server, you also need to create a new Outlook profile and set it as the default one for each mailbox user. Learn how to do so by referring to our article on How to recreate Outlook profiles after the migration.

This concludes the post-migration actions. You can now remove the migration job from both programs by clicking the Delete button on the menu.

Migrating from a hybrid environment

To migrate from a hybrid environment to a non-hybrid one, you need to create two separate migration jobs.  The first one will connect to an on-premises Exchange server and the second one to an Office 365 tenant.

  1. Open the migration job wizard by clicking Create a new migration job on the How to start card (Dashboard tab). Select your source server (Exchange Server or Office 365) and click OK.
  2. Enter a unique name that will let you quickly identify the migration job.
  3. In the next step, select your source Exchange server or Office 365 tenant from the Source server drop-down list. If you haven’t configured any connections yet, click Add new source connection instead and configure the connection according to the source server of your choice:
    1. on-premises Exchange server
    2. Office 365 (Exchange Online)

    Warning

    When configuring a connection to a source Office 365 tenant, make sure to enter the admin's primary email address from the *.onmicrosoft.com / *.onmicrosoft.de domain in the Admin account step. Otherwise, you will encounter problems if you transfer the domain from your source server to the target one during the migration.

  4. By default, the program will migrate the mailboxes of all users in your Active Directory and public folders. If you want to exclude, for example, public folders from this migration job, select Public Folders and click Remove. Similarly, you can remove All Office 365 users / All Active Directory users if you only want to migrate public folders. If you want to select specific mailboxes to be migrated, refer to this article to learn how to do so.
  5. In the Target mailboxes step, you need to select your target Office 365 tenant or click Add new target connection in the Target server drop-down list to configure a new target server connection.
  6. In the next step, click Match mailboxes to open a new window, where you need to match the mailboxes on your source server with respective ones on the target server. The quickest way to do this is to use the automatching feature that compares the Active Directory attributes between the source and target server mailboxes. To take advantage of that feature, select all mailboxes (by pressing Ctrl+A) or only individual ones (press Ctrl to select them one by one, or Shift to select two or more rows) and click Automatch. If necessary, you can configure the matching parameters and try the automatching again, or even provide the email address manually. If you need to create mailbox-enabled users on your target server first, you can do so in the program, too.

    Warning

    If you are migrating to Office 365 Germany, you need to manually create users in Office 365 admin center and assign them licenses.

    Once you’ve matched all your mailboxes, click Save to apply your configuration. You can now close the Match mailboxes window.
  7. Setting up the scheduler in the next step is optional. If you don’t want the migration job to run 24/7, click Enable scheduler and configure the time frames during which the program will automatically start and stop the migration process. If you leave the checkbox unselected, you will have to start and stop the migration job manually (see step 12 below).
  8. In the Time filter step, you can decide to migrate all times or just those created/modified before or after a specific date. Learn more on how to set up the time filter.
  9. The Folder filter allows you to migrate only specific folder types to your target server. To do so, simply select the checkboxes next to those folder types that you want to include in the migration process. For more information on how the folder filer works, refer to this article.
  10. In the Advanced settings step, there are some additional options that you can adjust, if necessary, or leave at their default values.
  11. In the final step of the wizard, Job summary, you can verify if you have configured the migration job according to your needs. If so, click Finish.
  12. To start the migration job, go to the Jobs tab, select your migration job, and click Start. If you have enabled and configured the scheduler (see step 7 above), you don’t have to do anything – the program will start the job automatically, according to your settings.

Once completed, configure a second migration job, but this time select different source server (step 1). Remember also to provide a different name for the job.

Post-migration activities

If applicable, once the migration is finished, you need to change MX records via your domain host to enable mail flow to the new server. Until these changes propagate, you can still receive emails on your old server. Therefore, first make sure that the MX records are updated, and then perform the following steps in CodeTwo migration software:

  1. Reconfigure the source and/or target connections if you have changed the domain in either of them.
  2. Go to the Jobs tab and select your migration job.
  3. Select all mailboxes (press Ctrl+A), and click Refresh email addresses on the menu.
  4. Check the results window. In case of any errors, refer to this article for more information.
  5. Once all email addresses have been refreshed, click Rescan on the menu. This will migrate any new emails that were sent you your old server during the migration or when the changes to the MX records were propagating.
  6. If after the migration Outlook doesn't connect to the new Office 365 tenant, you also need to create a new Outlook profile and set it as the default one for each mailbox user. Learn how to do so by referring to our article on How to recreate Outlook profiles after the migration.

This concludes the post-migration actions. You can now remove the migration job from both programs by clicking the Delete button on the menu.

Cases for using the hybrid migration

  1. Gradual migration in a corporate environment
  2. Migrating within a hybrid environment
  3. Migrating to a hybrid environment
  4. Migrating from a hybrid environment

Gradual migration in a corporate environment

A large corporation is planning to migrate all resources from Exchange on-premises to Exchange Online, but not at once. Since the company employs hundreds of people, there is a lot of data to be migrated. Each department will be migrated separately, which will be reflected by different migration jobs created in the CodeTwo migration software. During the whole transition period, the company will maintain a hybrid environment, so that all employees have access to shared resources, such as calendars, tasks or GAL (Global Address List). Once an entire department is migrated, you need to set up connectors to enable mail flow between mailboxes in your on-premises and Office 365 environments. You can now start a second migration job to migrate another department. Once every department is migrated, you can decommission your on-premises Exchange server if it’s not necessary anymore.

Migrating within a hybrid environment

You have a hybrid environment deployed, in which on-premises Active Directory is synchronized with Azure AD. You plan to migrate some of the mailboxes stored on the on-premises server to the cloud. If you applied default settings when configuring the synchronization process, it is quite possible that the msExchMailboxGuid attribute is also synchronized. If so, assigning Office 365 licenses to synced users will not create mailboxes and, therefore, the migration will not be possible. You need to follow these steps first to reconfigure the synchronization process. When the synced accounts have different msExchMailboxGuid attributes in Office 365, you can proceed with the standard migration procedure.

Migrating to a hybrid environment

When you decide to migrate all your data from a legacy Exchange server to a hybrid environment, you need to configure separate migration jobs in two programs. Use CodeTwo Exchange Migration for the items that you need to migrate to an on-premises location and CodeTwo Office 365 Migration for data that you want to store in Exchange Online. If you intend to migrate only some of the mailboxes to the on-premises server and others to the cloud, remember to match them properly in each migration job. You can also use the folder filter to decide which items go to which server.

Migrating from a hybrid environment

If you plan to migrate data from a hybrid environment to a non-hybrid one, you need to configure two connections to source servers: one to the on-premises Exchange and the other to Exchange Online. Once that’s done, create two migration jobs, each for a different source server type. You don’t have to configure the folder or time filters if you want to migrate all the data. You can, however, configure the scheduler to start and stop the migration only on specific days or hours. If you start both jobs at once, the second one will be paused until the first migration job is completed.

Was this information useful?