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. Technically, it 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
Info
Keep in mind that some steps described below may differ in the case of using a CSV file with matched source and target mailboxes to perform a migration (e.g. from a hosted Exchange server). Instructions on how to configure a migration job for this scenario can be found here.
- Migrating within a hybrid environment
- Migrating to a hybrid environment
- Migrating from a hybrid environment
Migrating within a hybrid environment
Important
This scenario assumes that you are using Microsoft Entra Connect (Azure AD 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. Thanks to that, our migration software will be able to create a separate mailbox for the same user in the target environment and complete the migration. Learn more on how to exclude the msExchMailboxGuid attribute from being synchronized in our Knowledge Base article.
At the same time, be aware that coexistence of the two mailboxes (on-premises & cloud) for the same user in a hybrid environment is an undesirable state because it may lead to mail routing issues. For example, emails from within the organization will be delivered to the mailbox that is located only in the same environment (e.g. Exchange Server) as the sender’s one. That’s why, for this scenario, we recommend that you complete the migration without unnecessary delays. See this article to learn how to cut-off on-premises mailboxes.
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 them in this scenario requires special preparations, as described in this article.
- Open the migration job wizard by clicking Create a new migration job on the How to start card (Dashboard tab). Select Office 365 and click OK.
Migrating to Office 365
If you want to migrate data in the opposite direction, you need to use CodeTwo Office 365 Migration instead. For steps on how to migrate from on-premises Exchange to Office 365 in a hybrid environment, check out the corresponding article in the program’s user manual.
- Enter a unique name that will let you quickly identify the migration job.
- In the Mailbox types step, select if you want to migrate primary mailboxes, archive mailboxes or both.
- In the next step, select your Office 365 tenant 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 Office 365 here.
- Select mailboxes you want to migrate or leave the All Office 365 users / All Active Directory users option in the box.
- In the Target mailboxes step, select your Exchange server or click Add new target connection in the Target server drop-down list to configure a new target server connection.
- In the next step, click Match mailboxes to open a new window, where you need to match Office 365 mailboxes with respective ones on your on-premises 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, click Automatch > Automatch all mailboxes or only select individual mailboxes (press Ctrl to select them one by one, or Shift to select two or more rows) and click Automatch > Automatch selected mailboxes. 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. Once you’ve matched all your mailboxes, click Save to apply your configuration. You can now close the Match mailboxes window.
- 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).
- 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.
- The Folder filter allows you to migrate only specific folder types to your on-premises environment, leaving other items in Office 365. 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 filter works, refer to this article.
- In the Advanced settings step, there are some additional options that you can adjust, if necessary, or leave at their default values.
- 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.
- 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 click Run delta migration. 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.
- 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.
- Enter a unique name that will let you quickly identify the migration job.
- In the Mailbox types step, select if you want to migrate primary mailboxes, archive mailboxes or both.
- 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:
Warning
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.
- 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.
- Depending on the program you are using, in the Target mailboxes step, you need to select your target environment. You can also click Add new target connection in the Target server drop-down list to configure a new target connection: see this article if you are using CodeTwo Office 365 Migration to migrate to Office 365, or go to this article if you want to configure a connection to your on-premises Exchange server in CodeTwo Exchange Migration.
- 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, click Automatch > Automatch all mailboxes or select individual mailboxes (press Ctrl to select them one by one, or Shift to select two or more rows) and click Automatch > Automatch selected mailboxes. 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. Once you’ve matched all your mailboxes, click Save to apply your configuration. You can now close the Match mailboxes window.
- 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).
- 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.
- 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 filter works, refer to this article.
- In the Advanced settings step, there are some additional options that you can adjust, if necessary, or leave at their default values.
- 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.
- 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 filter (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:
- Reconfigure the source and/or target connections if you have changed the domain in either of them.
- Go to the Jobs tab and select your migration job.
- 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.
- Check the results window. In case of any errors, refer to this article for more information.
- Once all email addresses have been refreshed, click Run delta migration from 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.
- 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. You can achieve these two goals in an automated way by using a GPO (see this article) or Microsoft Intune (see this article).
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.
- 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.
- Enter a unique name that will let you quickly identify the migration job.
- In the Mailbox types step, select if you want to migrate primary mailboxes, archive mailboxes or both.
- 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:
- 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.
- In the Target mailboxes step, you need to select your target Exchange server or click Add new target connection in the Target server drop-down list to configure a new target server connection.
- 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, click Automatch > Automatch all mailboxes or select individual mailboxes (press Ctrl to select them one by one, or Shift to select two or more rows) and click Automatch > Automatch selected mailboxes. 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. Once you’ve matched all your mailboxes, click Save to apply your configuration. You can now close the Match mailboxes window.
- 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).
- 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.
- 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 filter works, refer to this article.
- In the Advanced settings step, there are some additional options that you can adjust, if necessary, or leave at their default values.
- 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.
- 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:
- Reconfigure the source and/or target connections if you have changed the domain in either of them.
- Go to the Jobs tab and select your migration job.
- Select all mailboxes (press Ctrl+A) and click Refresh email addresses on the menu.
- Check the results window. In case of any errors, refer to this article for more information.
- Once all email addresses have been refreshed, click Run delta migration from 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.
- If after the migration Outlook doesn't connect to your new Exchange server, you also need to create a new Outlook profile and set it as the default one for each mailbox user. You can achieve these two goals in an automated way by using a GPO (see this article) or Microsoft Intune (see this article).
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
- Migrating within a hybrid environment
- Migrating to a hybrid environment
- Migrating from a hybrid environment
Migrating within a hybrid environment
You have a hybrid environment deployed, in which on-premises Active Directory is synchronized with Entra ID (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.