Team Drives-related fields in the Vault API are being replaced. Learn more.

Duplicate mail holds to Hangouts Chat

Hangouts Chat and Hangouts Meet together are the next generation of Hangouts. Later this year they will replace the original version (classic Hangouts) in G Suite.

Messages sent with classic Hangouts are subject to mail holds and retention. This is because classic Hangouts messages are stored in the same system that stores email messages for Gmail. Hangouts Chat, however, uses a separate system for storing chat messages, and it has its own holds and retention rules in Vault.

As part of this transition, mail holds and retention rules will stop protecting chat messages in classic Hangouts. Instead, Chat holds and retention rules will protect chat messages in both classic Hangouts and Hangouts Chat.

Vault admins must:

  • Create retention rules to cover both classic Hangouts and Hangouts Chat messages. Admins use the Vault UI to accomplish this.

  • Copy mail holds to Hangouts Chat. Admins can use the Vault UI to accomplish this. However, this can be tedious for organizations that have numerous holds in place. We're providing a script to help developers automate this process.

Learn more about how the migration to Hangouts Chat affects Vault.

Copy mail holds to Hangouts Chat

If your organization has a large number of holds to copy from mail to Hangouts Chat, you can use the process described below to:

  • Generate a list of mail holds

  • Use the list of holds to create similar holds in Hangouts Chat.

Step 1: Get ready

Before you perform any operations that impact live data in Vault, we recommend you complete the Java quickstart exercise. This will help you set up your environment and show you how to use a simple command-line application that sends requests to Vault.

Step 2: Download the holds migration scripts

  1. Download the files from GitHub.
  2. Extract the ZIP file and open to the following directory in a terminal window:

    ~/java-samples-master/vault/vault-hold-migration-api

The scripts enable Gradle to read mail holds and create duplicate holds for Hangouts Chat and support the following options:

Parameters
-a, --genholdreport Generate a report with all mail holds
-b, --duplicateholds Duplicate mail holds to Hangouts Chat
-e, --errorfile Path to error report. Vault will write errors to this file if any occur while reading mail holds or creating Hangouts Chat holds.
-f, --reportfile Path to file that contains mail holds that will be duplicated to Hangouts Chat. Vault writes to this file when you generate a report and reads from this file when you duplicate holds in Hangouts Chat.
-g, --includerooms Include conversations in rooms when duplicating holds to Hangouts Chat
-h Display options available with the script.

Step 3: Generate a list of mail holds

Run the following command to generate a list of all mail holds in Vault and write them to a file named input.csv:

 gradle -q run --args="--genholdreport --reportfile input.csv --errorfile error.txt"

Next steps

Before you create duplicate holds, we recommend you confer with a Vault admin about the following:

  • Holds in Hangouts Chat can't be based on date ranges or search terms. Duplicated mail holds that are based on these criteria will instead include all chat messages sent or received by covered users.

  • Decide whether any of the new holds need to also include rooms in Hangouts Chat. You need to move those holds to a separate CSV file and run the command with the --includerooms option.

Step 4: Create duplicate holds in Hangouts Chat

To create holds that cover DMs only, run the following command:

gradle -q run --args="--duplicateholds --reportfile input.csv --errorfile error.txt"

To create holds that cover DMs and conversations in rooms, run the following command:

gradle -q run --args="--duplicateholds --includerooms --reportfile input.csv --errorfile error.txt"