[Dovecot] mdbox, dsync
Timo Sirainen
tss at iki.fi
Fri Jan 29 18:53:10 EET 2010
I finally migrated my mails from mbox format to mdbox format using
dsync:
1. Stop dovecot, wait a few seconds for processes to die
2. dsync convert mdbox:~/mdbox
3. Change mail_location to mdbox:~/mdbox
4. Check that no new mails arrived during conversion (alternatively I
could have just run dsync again, but I decided not to test my luck)
5. Start dovecot
After fixing a pretty bad bug in dsync and a couple of other unrelated
bugs, everything seemed to work correctly and transparently. UIDs and
everything was preserved as expected. I think I even feel my mail
clients being faster than with mbox :)
~% du --exclude=.imap -bsh mail-old-mbox
707M mail-old-mbox
~% du -bsh mdbox/*
27M mdbox/mailboxes
704M mdbox/storage
The reason why I'm giving -b is because without it, mdbox was a lot
larger than mbox (734 MB vs. 710 MB). I guess this is because zfs
internally decided to waste some space for the files.
~/mdbox/storage% ls -lS
-rw------- 1 tss tss 13602413 2010-01-29 18:05 m.68
-rw------- 1 tss tss 10487382 2010-01-29 18:06 m.209
-rw------- 1 tss tss 7749964 2010-01-29 18:06 m.270
-rw------- 1 tss tss 7493010 2010-01-29 18:05 m.69
..
-rw------- 1 tss tss 2097246 2010-01-29 18:06 m.175
-rw------- 1 tss tss 2097213 2010-01-29 18:06 m.151
-rw------- 1 tss tss 2097173 2010-01-29 18:06 m.197
-rw------- 1 tss tss 2097163 2010-01-29 18:05 m.89
-rw------- 1 tss tss 1307164 2010-01-29 18:33 m.296
Total of 296 files. The reason why there are a few large files is
because their last mail is huge. I guess in future mdbox should try to
avoid doing that if it knows the mail's size beforehand. Actually I
thought it already tried to do that..
Anyway, let's hope it doesn't now corrupt all my mails.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20100129/75945bbe/attachment.bin
More information about the dovecot
mailing list