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.64k stars 211 forks source link

retainining previously backed up emails during subsequent backups #236

Closed sackio closed 4 years ago

sackio commented 5 years ago

If one runs backup A, saving all emails to a local directory. Then, one runs another backup B at a later date, saving all emails to the same local directory, will GYB delete or leave untouched any emails downloaded during backup A which were deleted on the server before backup B?

imennodenis commented 4 years ago

Hi! Same question here. Can somebody answer it please?

billdenney commented 4 years ago

If a message was received, moved to trash, and emptied from the trash before the backup occurs, the backup would miss it. See the wiki page description of the --spam-trash command line argument for how backing up spam and trash is managed.

I wanted to know the same answer, so I tested it. The process I used was:

  1. Send an email to the account
  2. Backup the account, and confirm that the email is in the backup
  3. Move the email to trash, and backup the account again
    1. One fewer message ID was detected
  4. Check if the file still exists. It does.
billdenney commented 4 years ago

@jay0lee, I tested the --spam-trash option and updated the wiki page to indicate that you can backup spam and trash with that option. If I'm wrong, please revert the change.

imennodenis commented 4 years ago

I think the question was not about spam/trash. I'll try to explain.

  1. GYB makes full backup.
  2. Email user deletes some messages from Inbox folder and empties recycle bin folder
  3. GYB makes next backup So will those deleted messages be deleted from GYB backup too? Or will GYB retain those messages forever in the backup? I have made some tests too and it seems that GYB does not delete any messages from backup. But it was just express testing so I'm not 100% sure about that.
stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.