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.
https://github.com/GAM-team/got-your-back/wiki
Apache License 2.0
2.6k stars 205 forks source link

Feature Request – Header Cleanup #358

Open ArcoForzato opened 2 years ago

ArcoForzato commented 2 years ago

I confirm I have upgraded to the latest GYB release from https://github.com/jay0lee/got-your-back/releases and I still have this issue. I confirm I am typing the command as described in the GAM Wiki at https://github.com/jay0lee/got-your-back/wiki

Full steps to reproduce the issue:

  1. Export Inbox: gyb --email abc@xyz.com --service-account --action backup
  2. Restore Inbox to another account: gyb --email archive@xyz.com --action restore --local-folder "C:\GAMADV-XTD3\GYB-GMail-Backup-abc@xyz.com" --service-account --label-prefix "ABC's Emails"

Expected outcome (what are you trying to do?): Restore ABC's emails to archive@xyz.com

Actual outcome (what errors or bad behavior do you see instead?):

restoring 15 messages (74/28498) ERROR: 400: Expected a single 'From' header. Skipping message restore. ERROR: 400: Expected a single 'From' header. Skipping message restore. restoring 17.1mb message (75/28498)

A Header Cleanup feature would be greatly appreciated!

Shaav commented 1 year ago

Also encountering this error restoring while restoring email backed up from a Workplace domain to a gmail.com address.

tiggertazz commented 1 year ago

I am having the same issue File are from a V10- Folder on an Apple computer All files were converted from Apple Mbox files to .eml file with partial-emlx-converter Then I run this command \Volumes/ServerData/gyb/companyname/gyb --action restore-mbox --label-restored "UserName-Email-Date" --local-folder /Volumes/ServerData/GMail-Backup-UsersName --email email@domain.com --service-account --batch-size 4 I have thousands of .eml files giving the following message: ERROR: 400: Expected a single 'From' header. Skipping message restore If you can add a Header Clean up feature that would be appreciated Thank you for your time and amazing work on GYB

jay0lee commented 1 year ago

This feature has existed for a while now. See:

https://github.com/GAM-team/got-your-back/releases/tag/v1.55

When --cleanup is specified GYB should detect duplicate headers. I haven't tested but you may need --cleanup-from also.

Jay

tiggertazz commented 1 year ago

Thank you for the info.