got-your-back
got-your-back copied to clipboard
Adding to existing label fails
Please confirm the following:
-
I have upgraded to the latest GYB release from https://github.com/jay0lee/got-your-back/releases and I still have this issue. Yes
-
I am typing the command as described in the GAM Wiki at https://github.com/jay0lee/got-your-back/wiki Yes
Full steps to reproduce the issue:
- Counting messages on target mailbox with label SomeLabel before restore
gyb --email [email protected] --action estimate --search "label:SomeLabel"
Got 939 Message IDs
GYB needs to examine 939 messages
GYB already has a backup of 0 messages
Estimated size 17.31mb 939/939 messages
- Restoring 69 messages with command
gyb --email [email protected] --action restore --local-folder [email protected] --label-restored "SomeLabel"gives warning on every message
...
WARNING: failed to create (existing?) label SomeLabel
WARNING: failed to create (existing?) label SomeLabel
WARNING: failed to create (existing?) label SomeLabel
WARNING: failed to create (existing?) label SomeLabel
WARNING: failed to create (existing?) label SomeLabel
WARNING: failed to create (existing?) label SomeLabel
restoring 30 messages (30/69)
WARNING: failed to create (existing?) label SomeLabel
WARNING: failed to create (existing?) label SomeLabel
WARNING: failed to create (existing?) label SomeLabel
WARNING: failed to create (existing?) label SomeLabel
WARNING: failed to create (existing?) label SomeLabel
WARNING: failed to create (existing?) label SomeLabel
WARNING: failed to create (existing?) label SomeLabel
WARNING: failed to create (existing?) label SomeLabel
restoring 30 messages (60/69)
WARNING: failed to create (existing?) label SomeLabel
WARNING: failed to create (existing?) label SomeLabel
WARNING: failed to create (existing?) label SomeLabel
WARNING: failed to create (existing?) label SomeLabel
WARNING: failed to create (existing?) label SomeLabel
WARNING: failed to create (existing?) label SomeLabel
WARNING: failed to create (existing?) label SomeLabel
restoring 9 messages (69/69)
- Counting SomeLabel messages in target after restore
Got 989 Message IDs
GYB needs to examine 989 messages
GYB already has a backup of 0 messages
Estimated size 19.14mb 989/989 messages
Expected outcome (what are you trying to do?):
All messages imported successfullly to label SomeLabel
Actual outcome (what errors or bad behavior do you see instead?):
Only 50 messages were imported into the label out of 69
So the script doesn't allow importing messages to the label that already exists and doesn't imports correctly. Please, fix it.
After re-inspecting the account again, I can add that those 19 messages that were skipped (50 out of 69 were processed only) were most likely duplicates that already existed on the target with this label. This is very related to the issue #378 I created earlier. GYB now does not understand and cannot handle duplicates on target. This can be added in future versions as an improvement.