Live migrating index/control files

Eirik Rye rye at trojka.no
Mon Apr 26 17:22:28 EEST 2021


> On 26 Apr 2021, at 16:03, azurit at pobox.sk wrote:
> 
> Btw, if your control files are OUTSIDE maildir and you are moving them back INSIDE maildir, notice (for example in my script) that .INBOX directory doesn't exists in maildir and control files for INBOX are placed directly in maildir instead. This is probably why you are failing to prevent resync/redownload.

Oh, thanks!

I was simply using rsync to synchronize the control/index directory tree into the maildir, incorrectly assuming the trees were the same in both configurations:

  rsync -uav /mail/{index,control}/${user:0:1}/${user:0:2}/${user}/ /mail/${user:0:1}/${user:0:2}/${user}/Maildir/;

I see now, as you said, that the control and index files for INBOX should be placed directly in the maildir, and that they have been recreated for the users in question.

I'll try modifying the sync part to also move the files from the .INBOX folder:

  rsync -uav /mail/{index,control}/${user:0:1}/${user:0:2}/${user}/ ~/Maildir/;
  mv -v ~/Maildir/.INBOX/* ~/Maildir/;
  rmdir -v ~/Maildir/.INBOX;

Thanks again!

Best regards,
Eirik


More information about the dovecot mailing list