Requirements
- Got Your Back (GitHub) — set this up with a service account before use. See the GYB documentation for setup instructions.
- GAMADV-XTD3 (GitHub) — this guide covers installing GAM on Google Cloud Shell (50 hours/week free, 5 GB storage, unlimited bandwidth).
This can all be done with the user account suspended.
Mailbox Data Handling
1. Create a group mailbox
With these properties you’ll establish a good and scalable precedent.| Property | Convention | Example |
|---|---|---|
| Name | Offboarded User - [User Full Name] (email_prefix) - YYYY-MM-DD | Offboarded User - John Smith (john.smith) - 2023-01-01 |
| Address | offboarded_[emailprefix]@domain.tld | offboarded_john.smith@domain.tld |
| Group Owner | You | |
| Permissions | Set everything to “Owner” |
2. Back up the user’s mail with gyb (messages under 25 MB only)
Substitute john.smith with the offboarded user’s address prefix and you with your admin address:
.eml format in a structured directory, along with an SQLite database tracking message metadata.
3. Restore the backup to the group mailbox
Restoration is rate-limited to approximately one message per 1.5 seconds — this is a Google API constraint.
4. Take a full backup of the user’s mailbox (all sizes)
5. Archive the mailbox and store it in a Shared Drive
Using ZStandard compression saves significant space and is faster than gzip. Requireszstd in your PATH.
6. Remove yourself as owner of the group mailbox.
7. Add the users inheriting this data as “Contributors” to the mailbox.
Drive Data Handling
1. Create a Google Shared Drive for the offboarded user
| Property | Convention | Example |
|---|---|---|
| Name | Offboarded User - [User Full Name] (email_prefix) - YYYY-MM-DD | Offboarded User - John Smith (john.smith) - 2023-01-01 |
| Access | You + Offboarded User added as Managers |
Be sure to grab the Teamdrive ID — it’s a string of random characters output after the generation.
Add the offboarded user as a manager
2. Move Data from the user’s “My Drive” to the “Shared Drive”
3. Set access
Remove yourself and the offboarded user as managers. Add any users who need the data ascontributors — keeping access at contributor level encourages working in Shared Drives rather than private storage.