GAM-team / got-your-back

Got Your Back (GYB) is a command line tool for backing up your Gmail messages to your computer using Gmail's API over HTTPS.

Home Page:https://github.com/GAM-team/got-your-back/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Message restore skips a lot of messages due to "Invalid label"

wout-peeters-gs opened this issue · comments

Full steps to reproduce the issue:

  1. Backup a bunch of emails from a Gmail account
  2. Restore said messages to other Gmail account

Expected outcome (what are you trying to do?): Messages restored

Actual outcome (what errors or bad behavior do you see instead?):
A large amount of errors like so:

ERROR: 400: Invalid label: IMPORTANT. Skipping message restore.
ERROR: 400: Invalid label: IMPORTANT. Skipping message restore.
ERROR: 400: Invalid label: SENT. Skipping message restore.
ERROR: 400: Invalid label: SENT. Skipping message restore.
ERROR: 400: Invalid label: IMPORTANT. Skipping message restore.

only a small number of messages is actually restored.

Seems that adding a prefix label with --label-prefix RESTORE worked around these errors.

Same message, restoring mbox but stops the process.

Restoring from 22.69gb file c:\tmp\tb\recupero.mbox...
Creating label Da leggere
400: Invalid label name - invalidArgume