joeyates / imap-backup

Backup and Migrate IMAP Email Accounts
MIT License
1.33k stars 74 forks source link

.mbox file longer than indicated by .imap file when using delay writing metadata #178

Closed glocknerc closed 9 months ago

glocknerc commented 9 months ago

I found #169 but since this is fixed, I figured this might be a new bug.

I have the same problem as originally reported, .mbox' is longer than indicated by .imap file, but I'm already running version 13. 0.0.

I've deleted accounts and recreated them, deleted the backup directory and ran a backup from scratch, to no avail.

To expand on this a bit:

I'm running it in mirror mode I start off with an empty storage directory, so no backup yet I run the first backup, it finishes without errors I run imap-backup local check, it returns no errors I immediately run imap-backup again, the output tells me it's deleting e-mails only present locally (even though no e-mail on the server was deleted or otherwise modified since the last backup) I run imap-backup local check, it returns the error

Through trial-and-error I found that if I start over with empty directories and then switch the storage mode from delay writing metadata to write straight to disk and then run imap-backup several times, the problem does not occur, i.e. the backup is consistent.

In case it matters, the account I'm backing up is hosted on iCloud.

joeyates commented 9 months ago

@glocknerc

Thanks for the detailed info. I'll check

joeyates commented 9 months ago

I've release version 13.3.0 with a fix for this.