Backing up a google workspace account and restoring it to a group

1,449 views
Skip to first unread message

Jake Yeager

unread,
May 14, 2021, 2:48:22 PM5/14/21
to Got Your Back: Gmail Backup
Hello All! 

I'm new to GYB and I can't really find any walkthroughs or guides on how to do this:

I downloaded an email backup of use...@organization.com.

I now need to restore the backup to a google group called us...@organization.com

Is there someone who might be able to help me achieve this? 

Here are the steps I've taken so far (my responses are in bold):

install with bash <(curl -s -S -L https://git.io/gyb-install)

Can you run a full browser? y

Please enter your email address: use...@organization.com

Enter your verification code: xxxxxxxxxxxxxxxx (place holder for the real verification code)

Click Allow on the prompt in my browser

Enter your verification code: xxxxxxxxxx (place holder for the real verification code)

I followed these steps:

1. Enter "GYB" for "Application name".

2. Leave other fields blank. Click "Save" button.

3. Choose "Desktop app". Enter a desired value for "Name". Click the blue "Create" button.

4. Copy your "client ID" value.

I authorized GYB to backup my email. I'm then presented with the menu.

Then I select  full access and storage quota and groups restore.

I then copy the ID and it authorizes properly and then passes all the scopes.

The last step is to now restore the file to a google group...but idk how to do that. Can someone please help me with that? I would very very much appreciate it! I read a bunch of articles in the wiki telling me I need to make sure its a service account and super admin, but I'm not sure how to do a service account. I attempted to follow the walk through in the wiki but without success. I can make the user a super admin, of course.

Please let me know!


Ready, Zack

unread,
May 17, 2021, 8:53:46 AM5/17/21
to got-yo...@googlegroups.com
When you say you downloaded a backup, I'm guessing that was through amethod other than using GYB (since you listed the steps of setting up GYB afterwards)?

I've found you can only do a live backup of a Gmail account using GYB (so it's a .sqlite directory structure, not a single file) and restore that to a group, I haven't been able to do it with a Google Vault (.mbox) or Google Takeout backup. I'm very happy to be corrected by someone else if I'm wrong about that too. Unfortunately it means you can't restore since-disabled accounts (ie .mbox export through Vault, which is what we do) to Groups.

The command I typically use is:
gyb --action restore-group --service-account --use-admin admin-...@domain.org --email email-o...@domain.org --local-folder GYB-GMail-Backup...@domain.org

Where the local folder is as mentioned above, a directory structure created by GYB when it did the backup of the active Gmail account.

I'm sure there's some way to generate the folder/subfolders from an .mbox file which would take care of the issue but I haven't really looked into that yet.

Hope this was some help,

Zack Ready
Sr. Systems Engineer
(office) 617.665.2081


--
--
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 on the web visit https://groups.google.com/d/msgid/got-your-back/dce9577a-a758-4574-af05-33f9664006b4n%40googlegroups.com.

The information transmitted in this electronic communication, including all contents enclosed and/or attached, is intended only for the person or entity to whom it is addressed and may contain material that is confidential, privileged or otherwise protected from disclosure.  Any review, re-transmission, copy, disclosure, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited.  If you received this information in error, please contact the sender and properly destroy this communication and all copies thereof.

Jay Lee

unread,
May 17, 2021, 9:20:30 AM5/17/21
to Got Your Back: Gmail Backup
Since GYB 1.40 we detect if the restore folder is a traditional GYB backup or if it contains mbox files and we read them appropriately with the restore-group argument.

Jay

Ready, Zack

unread,
May 17, 2021, 9:21:19 AM5/17/21
to got-yo...@googlegroups.com
This is awesome, thanks for the correction!


Zack Ready
Sr. Systems Engineer
(office) 617.665.2081

Jake Yeager

unread,
May 17, 2021, 9:21:23 AM5/17/21
to got-yo...@googlegroups.com
That's the same command I use! Both accounts are enabled, its just that one is a group as opposed to an actual email.

This is the message I get when I run the command

image.png

I don't think this is right.

Here is the command copied

Users/user/bin/gyb/gyb --action restore-group  --use-admin xx...@organization.com --email xx...@organization.com --local-folder /Users/user/bin/gyb





--
Jake Yeager
IT Administrator
DotCom Therapy
Therapy for everyone, everywhere
e. jye...@dotcomtherapy.comw. www.dotcomtherapy.com
1-844-5DOTCOM x7174
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.

Jay Lee

unread,
May 17, 2021, 9:29:48 AM5/17/21
to Got Your Back: Gmail Backup
"Groups supports restore of messages up to..." is meant to be an informative message, it is not an error.

Jay Lee


Jake Yeager

unread,
May 17, 2021, 9:38:50 AM5/17/21
to got-yo...@googlegroups.com
When I get that message I go to the google groups archive and none of the messages are posted. 

I did just find that there is another folder that actually contains the emails in my local folder. When I attempt to run the command again using that folder, it starts to upload them but says this

image.png

I copied the client secrets as well as the oauth jason files.

Seriously, I appreciate you both so very much for taking the time to assist!!

Jay Lee

unread,
May 17, 2021, 9:43:51 AM5/17/21
to Got Your Back: Gmail Backup
Is the user you are specifying with --use-admin a Workspace super admin?

Jay Lee


Jake Yeager

unread,
May 17, 2021, 9:53:54 AM5/17/21
to got-yo...@googlegroups.com
I just changed them to a super admin. 

I'm getting a bit further now, it says this

/Users/userbin/gyb/gyb --action restore-group  --use-admin xx...@organization.com --email yy...@organization.com --local-folder /Users/user/GYB-GMail-...@organization.com


Using backup folder /Users/user/GYB-GMail-...@organization.com

Groups supports restore of messages up to 26214400


Is this the correct response? I was seeing the Restoring Messages prompts before I made them a super admin


Jerry Wang

unread,
Aug 13, 2021, 3:23:07 PM8/13/21
to Got Your Back: Gmail Backup
If you are backing up Google Workspace data as a domain admin,  take a look at  CubeBackup.

Joe Kong

unread,
Dec 6, 2021, 1:34:57 PM12/6/21
to Got Your Back: Gmail Backup
Did you manage to get the restore to work?  I get the same message, but when I check the groups, none of the emails have been imported.

Thanks for any tips!

Reply all
Reply to author
Forward
0 new messages