User Tools

Site Tools


how_to_do_an_email_migration_between_from_google_workspace_instances

Migrating email data between Google Workspace and Gmail accounts can be a complex process, especially when different levels of administrative access are involved. In this article, I will discuss some methods I have found useful for migrating data to and from Google Workspace/Gmail accounts. In my IT career, I have frequently dealt with the following two cases: migrations without administrator rights and migrations with administrator access.

For cases where administrative access is unavailable, such as with personal @gmail.com accounts, we provide practical methods and tools to facilitate the migration, given the scarcity of detailed documentation on these situations. Additionally, we offer guidance for scenarios where admin rights are present, highlighting the use of specialized tools and services that simplify the process.

A special section is dedicated to real estate agents, addressing their unique data migration needs and considerations. This guide will help readers understand the necessary steps, available tools, and best practices for a smooth and secure transition between Google Workspace instances. Whether you're an IT professional or a non-technical user, our aim is to provide you with the knowledge and resources to manage email migrations effectively.

The two main scenarios covered in this article are:

1. Migrations Without Administrator Rights: This scenario applies to situations where administrative access to the source email accounts is not available, such as personal @gmail.com accounts. These migrations typically require manual methods and third-party tools due to the absence of admin-level controls.

Migrations Without Administrator Access on Both Ends

MigrationWiz IMAP Migrations

See the following documentation for how to use IMAP to migrate Google Workspace when the project creation steps are broadly similar to the case when administrator credentials exist of both ends, and the destination account configuration is identical.

Create a Mailbox Migration Project (see screenshots for Gsuite to Gsuite)

1. Start in MigrationWiz: Navigate to “Go to My Projects” and click “Create Project.”

2. Select Project Type: Choose “Mailbox” as the project type for migrating email, calendars, and contacts.

3. Project Details: Enter a project name and select a customer.

4. Proceed to Endpoints: Click “Next Step” to set up your endpoints.

Setting Up Endpoints

1. Endpoints Overview: In MigrationWiz, endpoints are created to establish source and destination points for the migration.

2. Create New Source Endpoint:

Click “Endpoints,” then “Add Endpoint.”

Select “IMAP” as the endpoint type.

For Gmail migrations, use the server name imap.gmail.com and port 993, ensuring SSL is enabled by checking “Use SSL.”

Gmail IMAP Settings

● IMAP Server: imap.gmail.com

● IMAP Port: 993

● IMAP Security: SSL / TLS

● IMAP Username: Your full email address

● IMAP Password: Use an App Password here

Google Migration Service

Google has a data migration service which can migrate IMAP accounts. However, there is a limitation with this where only one Google Workspace instance can be migrated to a given destination at a time.

Using Rclone to Migrate Google Photos

The process for migrating Google Photos with Rclone is very similar to the previously mentioned drive migration process. Of note are the following items. Unless the user particularly requests reuploading photos to Google Photos, uploading them to Google Drive may be the simpler workflow. Google Photos data can be found in the Photos subfolder of the Takeout archive.

To upload to Google Photos, use the rclone copy or rclone sync command to upload photos to Google Photos. You can upload photos directly to albums by specifying the album path, such as rclone copy /path/to/photos remote:album/MyAlbum. Note that uploads go into albums created by rclone, adhering to the API's limitations.

Using Got Your Back to Reupload Google Takeout Email Archives

In almost all cases, it is preferred to use IMAP. However, in some cases, there can be compliance restrictions that prevent directly logging in to Google Workspace accounts. In this case, it is possible to use the output of the Google Takeout tool to rebuild email data. This will usually not preserve labels and folder structure. Follow the instructions here to install GYB https://github.com/GAM-team/got-your-back

Use the service account for authentication, using the previously generated admin JSON token.

Use the GYB command to upload the MBOX file to the desired Google account.

gyb –email [email protected] –action restore-mbox –local-folder “/path/to/mbox/file” –service-account

Replace [email protected] with the email address of the Google account where you want to upload the MBOX file.

Replace /path/to/mbox/file with the file path of your MBOX file. The –service-account flag tells GYB to use the service account for authentication.

Using Rclone to Reupload Google Takeout Archives of Google Drive

Follow the Rclone setup instructions in the Rclone for team drives instructions.

The command to copy the contents of the takeoutarchive folder to the root of the Google Drive for [email protected] would look something like this:

rclone copy /path/to/takeoutarchive gdrive_remote:/ –drive-impersonate [email protected]

Replace /path/to/takeoutarchive with the actual path to your takeoutarchive folder.

Here's what each part of the command does:Italic Text

● rclone copy: This tells rclone to copy files from the source to the destination without deleting anything.

● /path/to/takeoutarchive: This is the source path on your local machine.

● gdrive_remote:/: This is the destination path on Google Drive. The gdrive_remote part should be replaced with the name of your configured Google Drive remote. The colon (:) and slash (/) indicate the root directory of the Google Drive.

● –drive-impersonate [email protected]: This flag tells rclone to use the admin credentials provided during the setup of gdrive_admin instead of requiring authentication at the user level.

2. Migrations With Administrator Access: This scenario covers situations where administrative rights are available on both the source and destination accounts. Admin access allows for the use of streamlined and automated migration tools, often provided by Google Workspace, to ensure a more efficient and straightforward data transfer process.

MigrationWiz

MigrationWiz is a data migration application which can be used to migrate email, contacts, calendar and drive data between Google Workspace accounts and instances. It can also com Microsoft365 to Gsuite. Create a Mailbox Migration Project

1. Access MigrationWiz: Sign in to MigrationWiz and navigate to “Go To My Projects.”

2. Create Project: Click “Create Project” and select “Mailbox migration type.”

3. Project Details: Enter a project name, select an existing customer or create a new one by providing details like Primary Email Domain and Company Name.

4. Set Endpoints:

o For the source, select “G Suite (Gmail API)” from the dropdown. If an endpoint doesn't exist, create one by specifying the endpoint name, type, and uploading the service account JSON file.

o Repeat the process for the destination endpoint, selecting the correct type of email hosting.

Configure Endpoints

● Endpoint Creation: If creating new endpoints, specify an endpoint name, select “Google Workspace (Gmail API)” as the type, and provide Google service account credentials through the JSON file. ● Administrator Username: Enter a valid administrator email for your Google Workspace account.

Add Accounts for Migration

● Quick Add: Add items individually by providing the email address, login name, and password.

● Bulk Add: Use a CSV file to import multiple source and destination email addresses simultaneously.

Purchase and Apply Licenses ● Obtain Licenses: Go to the billing section. User Migration Bundle licenses are recommended for larger accounts, but for smaller accounts there is a Google Workspace license type. ● Apply Licenses: In MigrationWiz, select the project, choose the users, and apply the User Migration Bundle License from the “More” menu.

Start the Migration ● Start Migration: Begin the migration process by selecting “Full Migration“ under the Start Migration options for the chosen users.

Got Your Back

The Got Your Back application is an alternate method to migrate a Google Workspace instance. See the following documentation for this tool. https://github.com/GAM-team/got-your-back/wiki

Shared Drives with Rclone

Rclone is a free and open-source data copying tool which can be used to migrate shared drives (as an alternative to additional cost with MigrationWiz as MigrationWiz has an additional fee per shared drive. It can also be used to migrate individual drives, but MigrationWiz is my suggested method for migrating this data when we have full administrator access to both the source and the destination Google Workspace. In the section where migrations without administrator access is discussed, I will provide a walkthrough of one way to use Rclone to migrate individual drives. The relevant sections of Rclone’s documentation can be found here for additional information beyond what this documentation provides. https://rclone.org/drive/ and https://rclone.org/googlephotos/ Using Rclone to Migrate Shared Drives

The first step to use Rclone to migrate a shared drive is to create what is called a remote for the shared drive. A remote is a mapping between login information (in this case the JSON tokens generated in the “Generating Administrator API Tokens” section of this document) and a cloud storage type.

Additionally, since the Google Workspace Starter.

First, open the terminal, and run the rclone config command. A walkthrough of setting up the Rclone remote should appear.

● Choose n for a new remote.

● Enter a name for the source remote. The name of the remote is for reference when running future commands and does not need to be set to any particular value as long as it can remember which account and drive correspond to which name.

● Select Google Drive as the storage type by entering the number corresponding to Google Drive.

● Leave the client ID and secret blank (if performance issues are encountered, you may have to generate one, but usually using the admin API token bypasses the issue discussed in the message)

● Select the scope with full access (usually option 1).

● Specify the path to your service account credentials JSON file for the source instance when prompted for the service_account_file.

● Choose n when asked if you want to set advanced options.

● Choose y for configuring as a Shared Drive for the source and select the specific Shared Drive you wish to migrate.

Repeat the steps above to configure a new remote for the destination Google Workspace instance. Use a different name for this remote and specify the service account credentials JSON file for the destination instance. However, you will need to migrate to an individual user’s Google Drive instead of a shared drive as the destination, as Radius’ Google Workspace is not on a billing tier that supports shared drives.

Once both remotes are configured, you can use rclone to migrate the shared drive from the source to the destination Google Workspace instance. The basic command for migration is:

rclone copy source_drive: destination_drive: –drive-server-side-across-configs

● Replace source_drive with the name of your configured source remote.

● Replace destination_drive with the name of your configured destination remote.

● The –drive-server-side-across-configs flag allows server-side copying across different Google Drive configurations, which is necessary for migrating between different Google Workspace instances.

By following the detailed guidelines provided, you will be well-equipped to handle any email migration challenge, ensuring a successful and secure transition.

how_to_do_an_email_migration_between_from_google_workspace_instances.txt · Last modified: 2024/08/12 21:47 by angeline