joeyates / imap-backup

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

allow migrate without reset flag #142

Closed maty974 closed 1 year ago

maty974 commented 1 year ago

Hi @joeyates

I'm still in the same case as my previous issue, I need to migrate mail accounts to the same domain name.

In the case of a domain transfert to the same domain name to another host provider, I will create new empty target mail accounts on the new hosting provider, but before I do the migrate command it is possible that new mails arrive in the new empty mail box and cannot be backed up before migration is done

To avoid loosing theses newly arrived mails the --reset flag is problematic while using the migrate command

I hope my explanations are clear and a solution is available for again this (not so?) special case :smiley:

Thanks again :pray:

joeyates commented 1 year ago

@maty974 I'll have another look at the migrate command to see if it is really necessary to require that the destination folder is empty.

IIRC, it was originally intended to avoid the mess of repeated migrations causing multiple copies of emails to end up on the destination server. If that is the only reason why there's this requirement, the --reset flag can become optional.

maty974 commented 1 year ago

Hi @joeyates

That would be awesome thanks! let me know if I can test it ;)

joeyates commented 1 year ago

@maty974

I've release this as v9.0.1.rc1. Let me know if you get a chance to test it. Thanks!

maty974 commented 1 year ago

Hi @joeyates !

Yeah it seems to work fine :+1:

Do the migrate command use the option like multi_fetch_size ? It seems to be very slow compared to the backup command

EDIT: sadly, the upload speed is extremly slow, a mail box of 500Mo take more than 1 hour to migrate :crying_cat_face:

Thanks again for your help

maty974 commented 1 year ago

@joeyates my fault, something was limiting my VM traffic đź‘Ś

everything seems to be fine, without the now optional —reset argument

thanks 🙏