Using GYB to Migrate Emails to a Google Groups Collaborative Inbox

148 views
Skip to first unread message

Will Ross

unread,
Jan 21, 2025, 5:51:34 PMJan 21
to Got Your Back: Gmail Backup
Hi I was trying to make GYB migrate emails from google workspace emails to google groups on Mac. Was able to get GYB on terminal and run but when I was ready to migrate the emails with the code: "gyb --companyappleid-old at reination.com --restore-group companyappleid at reination.com

it showed this: " zsh: command not found: gyb "

What am I doing wrong? Thanks!

at = @ 

Brett Carver

unread,
Jan 21, 2025, 6:57:17 PMJan 21
to got-yo...@googlegroups.com
it showed this: " zsh: command not found: gyb "

Try specifying the full path to where the gyb executable is located.

Will Ross

unread,
Jan 22, 2025, 9:06:46 AMJan 22
to Got Your Back: Gmail Backup
Full path was 

File /Users/itcomputer/bin/gyb/oauth2service.json

Will Ross

unread,
Jan 22, 2025, 9:29:11 AMJan 22
to Got Your Back: Gmail Backup
When I follow the path and open gyb it does this before I can type anything (see attached)
Untitled.jpg

Dan Casmas

unread,
Jan 22, 2025, 10:27:12 AMJan 22
to got-yo...@googlegroups.com
The command is going to be something like

/Users/itcomputer/bin/gyb/gyb --companyappleid-old at reination.com --restore-group companyappleid at reination.com

However I think the command will look more like what I wrote.

/Users/itcomputer/bin/gyb/gyb --email <DestinationEmailAddress> --action restore-group --service-account --batch-size 4 --strip-labels use-admin <SuperEMail>

But I bet Jay will come along at some point and advise.

--
--
You received this message because you are subscribed to the Google
Groups "Got Your Back: Gmail Backup" group.
To post to this group, send email to got-yo...@googlegroups.com
To unsubscribe from this group, send email to
got-your-bac...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/got-your-back?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "Got Your Back: Gmail Backup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to got-your-bac...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/got-your-back/2e49688f-a443-4fd5-82f3-e7da69036105n%40googlegroups.com.


--
Dan Casmas
SONOS | Senior Systems Engineer
Dan.C...@Sonos.com | Pronouns: he/him/his

Dan Casmas

unread,
Jan 22, 2025, 10:31:46 AMJan 22
to got-yo...@googlegroups.com
correction to my command

/Users/itcomputer/bin/gyb/gyb --email <DestinationEmailAddress> --action restore-group --service-account --batch-size 4 --strip-labels --use-admin <SuperEMail>

Will Ross

unread,
Jan 22, 2025, 5:41:20 PMJan 22
to Got Your Back: Gmail Backup
After much trail and error I now have gotten in a circle with the error. 

I have the correct JSON file information:
{
  "installed": {
    "client_id": "YOUR_CLIENT_ID.apps.googleusercontent.com",
    "project_id": "YOUR_PROJECT_ID",
    "auth_uri": "https://accounts.google.com/o/oauth2/auth",
    "token_uri": "https://oauth2.googleapis.com/token",
    ...
  }
}

And have the oauth url correct but the Error 400 always pop up. Any suggestions with assistance for this?
Untitled 11.jpg

Will Ross

unread,
Jan 23, 2025, 5:41:13 PMJan 23
to Got Your Back: Gmail Backup
Ok so now I have come to the conclusion that migration to Google Groups might not be possible. Is that true?

Nick

unread,
Jan 31, 2025, 10:35:19 PMJan 31
to Got Your Back: Gmail Backup
Hi all,

> Will: it showed this: " zsh: command not found: gyb "

I see, judging by the automatic script as well as the slower manual setup in the wiki, the alias part of the script wasn't updated for zsh on macOS and as such it won't work for those who have not manually added a command that emulates bash config files in zsh. Because of this, the script might automatically create an alias in a bash config file, but this is then not used by zsh.

To keep it simple, you can create the alias in your .zshrc file by running:

echo "alias gyb='~/bin/gyb/gyb'" >> ~/.zshrc

Ok so now I have come to the conclusion that migration to Google Groups might not be possible. Is that true?

No worries. Once the setup's done correctly, it'll work fine. You need not dive in json files. It's a fairly quick setup.
Since all steps are guided in Terminal, I recommend starting over so you can follow each step again.
1. You can delete any existing GYB projects in Google Console: https://console.cloud.google.com/
2. You can delete everything in your gyb folder over at ~/bin/gyb/gyb
3. Then run the quick start command below, as copied from https://github.com/GAM-team/got-your-back
this will download GYB, install it and start setup.


In the setup you give your super admin access to gyb, this is the address you'll later use with --use-admin.
Once everything's set up properly, you can indeed start using it.

1. Working folder:
I suggest temporarily making a new gyb folder somewhere to work in, e.g., in your Documents folder.
This way we prevent unnecessary clutter in gyb's installation folder.
Then, in Terminal use: cd ~/Documents/gyb

2. Backing up:
The Groups Migration API does not support emails larger than 25 MB. We can skip those in the backup. Not sure if gyb does this automatically, but there's no harm in preventing it.

gyb --email exp...@email.com --service-account --search smaller:25M

3. Restoring to group:
believe enabling conversation mode was a prerequisite, either way it doesn't hurt to enable.

gyb --email imp...@groupemail.com --action restore-group --local-folder GYB-GMail-B...@email.com --use-admin super...@email.com

Let us know if this solves it for you.
Note: Jay's advice from the wiki: I'd also recommend holding on to the local backup of the user's mail should you ever wish to restore to the mailbox.

Op donderdag 23 januari 2025 om 23:41:13 UTC+1 schreef Will Ross:
Reply all
Reply to author
Forward
0 new messages