Restore of Mailbox Labels

71 views
Skip to first unread message

Vernen Grunewald (CN)

unread,
Dec 11, 2024, 12:05:49 PM12/11/24
to Got Your Back: Gmail Backup
Hi there,

We are trying to restore a mailbox into a group.
The mailbox had a lot of labels already created and after the restore, we dont see any of the labels inside of the group.

Is there a possibility to restore all the labels as well?

Your advise will be highly appreciated.

Kind regards,
Vernen

This is a staff email account managed by Fort McMurray Catholic Schools.  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. If you have received this email in error please notify the sender.

Jay Lee

unread,
Dec 11, 2024, 12:07:20 PM12/11/24
to Got Your Back: Gmail Backup
No. Google Group Migration API only supports restoring messages, it doesn't support applying labels to those messages. Thus there's nothing gyb can do here.

Jay

--
--
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/2becfcb9-484f-46e4-aad8-9b3c6aa67cb3n%40googlegroups.com.

John Ross

unread,
Dec 11, 2024, 12:57:39 PM12/11/24
to Got Your Back: Gmail Backup
Since you can't restore the email labels to the Google group, one possible workaround is as follows.

  1. Download the account's email using Takeout. This will generate one or more .mbox files, depending on the amount of email in the account.

  2. Copy the downloaded mbox file(s) to a folder of their own. NO OTHER ACCOUNT'S MBOX FILES SHOULD BE IN THE FOLDER.

  3. Use the attached python script (mbox-update.py) to add the email label to the subject line for each email in the mbox file. For example, if the label is "Test Label" and the email subject is "Migration", the resulting email subject will be "[Test Label] Migration".

  4. Restore the mbox file(s) to the group using GYB. For the --local-folder parameter, specify the local folder with this account's modified mbox file(s) in it. I haven't tested this yet with multiple mbox files in the folder. After the restore you can search in the group for the label and see the past messages, but new messages added to the group won't have the label in the subject.

gyb --action restore-group --service-account --use-admin [admin-account] --email [group-address] --local-folder c:\temp\mbox



Use mbox-update.py at your own risk - no guarantee.

mbox-update.py path-to-mbox-file [-onlyshowemailcount]

  • If you include -onlyshowemailcount as a parameter then it will only show how many emails are in the mbox file and no changes will be made.

  • Each time the script is run a csv log file will be created with a filename that includes the current date/time, such as mbox_updates_2024-11-26-092559.csv.


John
mbox-update.py
Reply all
Reply to author
Forward
0 new messages