[Dovecot] Mail migration to dovecot with doveadm backup
Reinhard Vicinus
r.vicinus at metaways.de
Thu Jun 28 13:59:33 EEST 2012
On 28/06/12 09:03, Reinhard Vicinus wrote:
>>> and afterwards:
>>>
>>> /usr/bin/doveadm -o imapc_user=user at example.org -o
>>> imapc_password=imappw
>>> -o imapc_host=local-mailbox -o imapc_features=rfc822.size -o
>>> imapc_port=18143 -D -v backup -R -f -u user at example.org imapc:
>>>
>>> dsync(user at example.org): Error: Mailbox INBOX changed its GUID
>>> (c92f64f79f0d1ed01e6d5b314f04886c -> 54c23c119d04eb4f005100004f99b03d)
>>> dsync(user at example.org): Error: msg iteration failed: Couldn't open
>>> mailbox c92f64f79f0d1ed01e6d5b314f04886c
>> Bug/"feature" .. you could try if running with
>> "imapc:/tmp/imapc-username" instead of "imapc:" helps.
> This works also without problems. So thanks for your help because this
> solves my problem. Let me know if i should test something more.
>
Sorry, I either made a mistake in my test setup or i can't reproduce it,
but adding imapc:/tmp/imapc-username instead of imapc: doesn't help. I
have circumvented my problem by changing the quota values directly in
the database in my migration process.
But there is the following difference between using
imapc:/tmp/imapc-username and plain imapc: if i backup a single, on both
servers empty mailbox with different guids from the non dovecot imap
server to the dovecot imap server, then plain imapc: throws some errors
but works, imapc:/tmp/imapc-username throws more errors and only deletes
the mailbox on the destination.
Test setup is as follow:
Both accounts don't contain a mailbox Test1:
/usr/bin/doveadm -o imapc_user=user at example.org -o imapc_password=imappw
-o imapc_host=local-mailbox -o imapc_features=rfc822.size -o
imapc_port=18143 -o mail=imapc: mailbox status -u user at example.org all Test1
<empty reply>
/usr/bin/doveadm mailbox status -u user at example.org all Test1
<empty reply>
Create Mailbox Test1 on the imapc server:
/usr/bin/doveadm -o imapc_user=user at example.org -o imapc_password=imappw
-o imapc_host=local-mailbox -o imapc_features=rfc822.size -o
imapc_port=18143 -o mail=imapc: mailbox create -u user at example.org Test1
<empty reply>
Create Mailbox Test1 on the dovecot server:
doveadm mailbox create -u user at example.org Test1
<empty reply>
List the status of mailbox Test1 on the imapc server:
/usr/bin/doveadm -o imapc_user=user at example.org -o imapc_password=imappw
-o imapc_host=local-mailbox -o imapc_features=rfc822.size -o
imapc_port=18143 -o mail=imapc: mailbox status -u user at example.org all Test1
Test1 messages=0 recent=0 uidnext=0 uidvalidity=87991 unseen=0
highestmodseq=0 vsize=0 guid=0f6e69ad71659995677b43f8a8312025
List the status of mailbox Test1 on the dovecot server:
/usr/bin/doveadm mailbox status -u user at example.org Test1
Test1 messages=0 recent=0 uidnext=1 uidvalidity=1340879819 unseen=0
highestmodseq=1 vsize=0 guid=a8076214cb33ec4f396700004f99b03d
Start Backup with imapc:/tmp/user:
/usr/bin/doveadm -o imapc_user=user at example.org -o imapc_password=imappw
-o imapc_host=local-mailbox -o imapc_features=rfc822.size -o
imapc_port=18143 backup -R -f -u user at example.org -m Test1 imapc:/tmp/user
dsync(user at example.org): Error: Failed to sync mailbox Test1: Mailbox
doesn't exist: Test1
dsync(user at example.org): Error: msg iteration failed: Couldn't open
mailbox 0f6e69ad71659995677b43f8a8312025
dsync(user at example.org): Error: Failed to sync mailbox Test1: Mailbox
doesn't exist: Test1
dsync(user at example.org): Error: Trying to open a non-listed mailbox with
guid=a8076214cb33ec4f396700004f99b03d
dsync(user at example.org): Error: msg iteration failed: Couldn't open
mailbox a8076214cb33ec4f396700004f99b03d
dsync(user at example.org): Error: Trying to open a non-listed mailbox with
guid=a8076214cb33ec4f396700004f99b03d
List the status of mailbox Test1 on the imapc server:
/usr/bin/doveadm -o imapc_user=user at example.org -o imapc_password=imappw
-o imapc_host=local-mailbox -o imapc_features=rfc822.size -o
imapc_port=18143 -o mail=imapc: mailbox status -u user at example.org all Test1
Test1 messages=0 recent=0 uidnext=0 uidvalidity=87991 unseen=0
highestmodseq=0 vsize=0 guid=0f6e69ad71659995677b43f8a8312025
List the status of mailbox Test1 on the dovecot server:
/usr/bin/doveadm mailbox status -u user at example.org all Test1
<empty reply>
result: the mailbox Test1 on the dovecot server got deleted.
with plain imapc: copying works but there are also still error messages:
Create Mailbox Test2 on the imapc server:
/usr/bin/doveadm -o imapc_user=user at example.org -o imapc_password=imappw
-o imapc_host=local-mailbox -o imapc_features=rfc822.size -o
imapc_port=18143 -o mail=imapc: mailbox create -u user at example.org Test2
<empty reply>
Create Mailbox Test2 on the dovecot server:
doveadm mailbox create -u user at example.org Test2
<empty reply>
List the status of mailbox Test2 on the imapc server:
/usr/bin/doveadm -o imapc_user=user at example.org -o imapc_password=imappw
-o imapc_host=local-mailbox -o imapc_features=rfc822.size -o
imapc_port=18143 -o mail=imapc: mailbox status -u user at example.org all Test2
Test2 messages=0 recent=0 uidnext=0 uidvalidity=87993 unseen=0
highestmodseq=0 vsize=0 guid=c0fd4ba8bd514c5c43ab9a897c8c014e
List the status of mailbox Test2 on the dovecot server:
/usr/bin/doveadm mailbox status -u user at example.org Test2
Test2 messages=0 recent=0 uidnext=1 uidvalidity=1340879820 unseen=0
highestmodseq=1 vsize=0 guid=a19eee292435ec4f676a00004f99b03d
Start Backup with imapc:
/usr/bin/doveadm -o imapc_user=user at example.org -o imapc_password=imappw
-o imapc_host=local-mailbox -o imapc_features=rfc822.size -o
imapc_port=18143 backup -R -f -u user at example.org -m Test2 imapc:
dsync(user at example.org): Error: Trying to open a non-listed mailbox with
guid=a19eee292435ec4f676a00004f99b03d
dsync(user at example.org): Error: msg iteration failed: Couldn't open
mailbox a19eee292435ec4f676a00004f99b03d
dsync(user at example.org): Error: Trying to open a non-listed mailbox with
guid=a19eee292435ec4f676a00004f99b03d
List the status of mailbox Test2 on the imapc server:
/usr/bin/doveadm -o imapc_user=user at example.org -o imapc_password=imappw
-o imapc_host=local-mailbox -o imapc_features=rfc822.size -o
imapc_port=18143 -o mail=imapc: mailbox status -u user at example.org all Test2
Test2 messages=0 recent=0 uidnext=0 uidvalidity=87993 unseen=0
highestmodseq=0 vsize=0 guid=c0fd4ba8bd514c5c43ab9a897c8c014e
List the status of mailbox Test2 on the dovecot server:
/usr/bin/doveadm mailbox status -u user at example.org Test2
Test2 messages=0 recent=0 uidnext=1 uidvalidity=87993 unseen=0
highestmodseq=1 vsize=0 guid=c0fd4ba8bd514c5c43ab9a897c8c014e
If instead of a normal Mailbox the special mailbox INBOX is used there
are still more errors and both ways don't work. I think because backup
isn't able to delete the mailbox INBOX on the destination site.
So i'll make sure that when i migrate an account the mail destination is
really empty.
More information about the dovecot
mailing list