[Dovecot] dsync not copying all mail
Hi,
I'm still trying to migrate from Dovecot 1.2.16 to 2.0.7 on FreeBSD. Previous attempts have failed with mails not being visible after the upgrade. Version 1.2.16 was migrated from maildir to dbox about a year ago via the convert-plugin. After previous attempts to "clean" the hybrid maildir-dbox situation I used imapsync to copy all mails from the old account to a new account. I would assume in this case I get a clean dbox-mailmap. I tried to run dsync on this new map but noticed a lot of mails are not syncing:
[vmail@mail ~]$ find /vmail2/new/bunbun.be/nick | wc -l 5329 [vmail@mail ~]$ find /vmail2/old/bunbun.be/nick | wc -l 6134
Any ideas? N.
Am 10.01.2011 14:59, schrieb Nick Rosier:
Hi,
I'm still trying to migrate from Dovecot 1.2.16 to 2.0.7 on FreeBSD. Previous attempts have failed with mails not being visible after the upgrade. Version 1.2.16 was migrated from maildir to dbox about a year ago via the convert-plugin. After previous attempts to "clean" the hybrid maildir-dbox situation I used imapsync to copy all mails from the old account to a new account. I would assume in this case I get a clean dbox-mailmap. I tried to run dsync on this new map but noticed a lot of mails are not syncing:
[vmail@mail ~]$ find /vmail2/new/bunbun.be/nick | wc -l 5329 [vmail@mail ~]$ find /vmail2/old/bunbun.be/nick | wc -l 6134
Any ideas? N.
deleted mails on old server... do expunge or purge befor syncing. imapsync will not copy deleted messages i think...
--
Dr. Nagler & Company GmbH Hauptstraße 9 92253 Schnaittenbach
Tel : 09622-7197-38 Fax : 09622-7197-50 Web : http://www.nagler-company.com E-Mail : tobias.daucher@nagler-company.com
Hauptsitz: Schnaittenbach Handelregister: Amberg HRB 4653 Gerichtsstand: Amberg Steuernummer: 201/118/51825 USt.-ID-Nummer: DE 273143997 Geschäftsführer: Dr. Martin Nagler, Dr. Dr. Karl-Kuno Kunze
Tobias Daucher wrote:
Am 10.01.2011 14:59, schrieb Nick Rosier:
Hi,
I'm still trying to migrate from Dovecot 1.2.16 to 2.0.7 on FreeBSD. Previous attempts have failed with mails not being visible after the upgrade. Version 1.2.16 was migrated from maildir to dbox about a year ago via the convert-plugin. After previous attempts to "clean" the hybrid maildir-dbox situation I used imapsync to copy all mails from the old account to a new account. I would assume in this case I get a clean dbox-mailmap. I tried to run dsync on this new map but noticed a lot of mails are not syncing:
[vmail@mail ~]$ find /vmail2/new/bunbun.be/nick | wc -l 5329 [vmail@mail ~]$ find /vmail2/old/bunbun.be/nick | wc -l 6134
Any ideas? N.
deleted mails on old server... do expunge or purge befor syncing. imapsync will not copy deleted messages i think...
The problem is not imapsync but dsync.
I created a new account nick2 and synced, with imapsync all mails from nick to nick2. I moved the old maildir (nick) to nick.old and renamed nick2 to nick. I checked the new mail and all mails were there (with the exception of 23 mails which according to imapsync were duplicates). So at this point I have a new "clean" mailmap; there are no mails missing.
I copied this new mailmap (nick) to a new filesystem (/vmail2/new) to do some migration tests and ran dsync to sync these mails. [vmail@mail ~]$ ./dsync -D -o mail_location=dbox:/vmail2/old/bunbun.be/nick mirror dbox:/vmail2/new/bunbun.be/nick
When I compare the 2 maildirs there are about 800 files missing:
[vmail@mail ~]$ find /vmail2/new/bunbun.be/nick | wc -l 5329 [vmail@mail ~]$ find /vmail2/old/bunbun.be/nick | wc -l 6134
If I do a diff on the missing files there are maps that are empty and where the source contains valid, non-deleted mails.
N.
On 10.1.2011, at 15.59, Nick Rosier wrote:
I'm still trying to migrate from Dovecot 1.2.16 to 2.0.7 on FreeBSD. Previous attempts have failed with mails not being visible after the upgrade. Version 1.2.16 was migrated from maildir to dbox about a year ago via the convert-plugin. After previous attempts to "clean" the hybrid maildir-dbox situation I used imapsync to copy all mails from the old account to a new account. I would assume in this case I get a clean dbox-mailmap. I tried to run dsync on this new map but noticed a lot of mails are not syncing:
Hmm. I thought I already answered this. Maybe I got distracted while answering it and aborted..
Anyway, you need a different way to migrate the hybrid maildir. http://dovecot.org/list/dovecot/2010-September/053012.html had some old ideas, but there is a newer program explained in http://dovecot.org/list/dovecot/2010-November/055191.html and the program itself is slightly updated in http://dovecot.org/list/dovecot/2010-November/055192.html. Save the attachment.bin into dbox-dehybrid.c and compile and run it. Get backups. :)
Timo Sirainen wrote:
On 10.1.2011, at 15.59, Nick Rosier wrote:
I'm still trying to migrate from Dovecot 1.2.16 to 2.0.7 on FreeBSD. Previous attempts have failed with mails not being visible after the upgrade. Version 1.2.16 was migrated from maildir to dbox about a year ago via the convert-plugin. After previous attempts to "clean" the hybrid maildir-dbox situation I used imapsync to copy all mails from the old account to a new account. I would assume in this case I get a clean dbox-mailmap. I tried to run dsync on this new map but noticed a lot of mails are not syncing:
Hmm. I thought I already answered this. Maybe I got distracted while answering it and aborted..
Anyway, you need a different way to migrate the hybrid maildir. http://dovecot.org/list/dovecot/2010-September/053012.html had some old ideas, but there is a newer program explained in http://dovecot.org/list/dovecot/2010-November/055191.html and the program itself is slightly updated in http://dovecot.org/list/dovecot/2010-November/055192.html. Save the attachment.bin into dbox-dehybrid.c and compile and run it. Get backups. :)
Hi Timo,
you had indeed answered this; I tried the utility but it did not help. That's why I tried the imapsync approach in hope that would clean the messages and create a new dbox-only account. I also ran the utility on the synced mailboxes and retried dsync but that did not fix it either. I'm really puzzled to why this is. How can I recognize a hybrid mailbox? All mailboxes only contain dovecot.index, dovecot.index.log, dbox.index and u.* files.
N.
On 10.1.2011, at 21.25, Nick Rosier wrote:
you had indeed answered this; I tried the utility but it did not help. That's why I tried the imapsync approach in hope that would clean the messages and create a new dbox-only account. I also ran the utility on the synced mailboxes and retried dsync but that did not fix it either. I'm really puzzled to why this is. How can I recognize a hybrid mailbox? All mailboxes only contain dovecot.index, dovecot.index.log, dbox.index and u.* files.
If there are no filenames that begin with a number, then it's not a hybrid mailbox. If there are more u.* files than number of messages in a converted mailbox with dsync, then .. well .. I'd just use Dovecot v2.0 on the original non-converted mailbox:
doveadm -u username force-resync INBOX
This will make sure all of INBOX's u.* files are in the index files. Do the same for the rest of the mailboxes too.
Timo Sirainen wrote:
On 10.1.2011, at 21.25, Nick Rosier wrote:
you had indeed answered this; I tried the utility but it did not help. That's why I tried the imapsync approach in hope that would clean the messages and create a new dbox-only account. I also ran the utility on the synced mailboxes and retried dsync but that did not fix it either. I'm really puzzled to why this is. How can I recognize a hybrid mailbox? All mailboxes only contain dovecot.index, dovecot.index.log, dbox.index and u.* files.
If there are no filenames that begin with a number, then it's not a hybrid mailbox. If there are more u.* files than number of messages in a converted mailbox with dsync, then .. well .. I'd just use Dovecot v2.0 on the original non-converted mailbox:
doveadm -u username force-resync INBOX
This will make sure all of INBOX's u.* files are in the index files. Do the same for the rest of the mailboxes too.
Thank you very much, that solved the problem! Ran force-resync on all mailboxes that were missing mails (made handy use of the subscriptions file) and they "automagicly" re-appeared. Just had to mark them read again.
N.
participants (3)
-
Nick Rosier
-
Timo Sirainen
-
Tobias Daucher