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.56k stars 203 forks source link

Temp error backendError - occurring with 80GB restore that previously was working #462

Open mcopley08 opened 3 months ago

mcopley08 commented 3 months ago

Full steps to reproduce the issue:

  1. I successfully started an 80GB mbox restore to a gmail account that got to ~12% completed. I stopped the run and re-started it multiple times and it worked, picking back up where it was before.
  2. Suddenly it does not make any more progress, every time I run the command I get the Temp error backendError. that others have been seeing. I've tried doing this on a different computer, and making a new Google Cloud project, using different internet connections - but none of it resolves the issue

What else can be done to continue with the inbox restore?

gyb — -zsh — 112×21 2024-04-15 at 4 25 45 PM

Please confirm the following:

urbaned121 commented 3 months ago

Hmm I have alike problem with GYB recently (begins about 10 days ago(?)). Im backing up mailbox what goes smoothly but when restoring it to another (both on the same google workspace) it constantly throws an errors:

500: Temporary System Problem. Try again later. - backendError

  • Giving up. restoring 15 messages (45/25178) Temp error backendError. Backing off 16 seconds...attempt 5/10

Temp error backendError. Backing off 32 seconds...attempt 6/10

Temp error backendError. Backing off 60 seconds...attempt 7/10

Temp error backendError. Backing off 60 seconds...attempt 8/10

Temp error backendError. Backing off 60 seconds...attempt 9/10

command to backup is: gyb --email backup@example.com --action backup --service-account and to restore I'm doing: gyb --email restore@example.com --action restore --local-folder GYB-GMail-Backup-backup@example.com --label-restored "BackupLabel" --service-account

I'm using GYB and GAM latest versions on MacOS M1 which doesn't really mean anything because initially (about a month ago) nothing like this appeared.

I suspect, but haven't confirmed it yet. I administer two Google Workspaces, both of which I deal with large mailboxes, and so far the problem is annoying in one of the Google Workspace instances.

EDIT: adding --batch-size 5 to restore command does not change anything

mcopley08 commented 3 months ago

Thanks @urbaned121 , and can confirm changing the batch size does not change anything for me either

wazimshizm commented 3 months ago

Also having this issue. Even on a tiny inbox (62 messages). Large inbox as well.

urbaned121 commented 3 months ago

@mcopley08 @wazimshizm Guys try with --batch-size 1 no errors so far and I managed to send 5k messages since the morning 5k/23k but the strange thing is that recently there was no need to add batch size

wazimshizm commented 3 months ago

@mcopley08 @wazimshizm Guys try with --batch-size 1 no errors so far and I managed to send 5k messages since the morning 5k/23k but the strange thing is that recently there was no need to add batch size

Can confirm batch-size 1 works, slower but it works. Thanks @urbaned121

imoseyon commented 2 months ago

I can confirm this issue. batch-size 2 also works for me.

mpcusack commented 2 months ago

I have also found that --batch-size 2 is the largest I can use and have a restore work reliably. Taking a few days to restore a 210k inbox, but better than nothing.

jay0lee commented 2 months ago

I just released GYB 1.81 that should fix this issue by reducing batch sizes. Please test and lmk if you are still seeing issues.

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

Jay

mpcusack commented 2 months ago

@jay0lee I see you reduced restore batch size to 1. In my testing at least 2 also works (and at 3 I start seeing errors).

Any idea what changed to cause these errors on batches larger than 2? Just an invisible change on google's side?

wazimshizm commented 2 months ago

This is working with batch size 2 at a time, but on a 160,000 messages it's going at a snails pace. Do we know any more about the situation?