[Dovecot] Mail migration to dovecot with doveadm backup

Reinhard Vicinus r.vicinus at metaways.de
Mon Jun 25 21:21:43 EEST 2012


On 25/06/12 18:46, Timo Sirainen wrote:
> On 24.6.2012, at 18.57, Reinhard Vicinus wrote:
>
>> i try to migrate mails from a non dovecot imap server to a dovecot imap server with doveadm backup as described there:
>>
>> http://wiki2.dovecot.org/Migration/Dsync
>>
>> i first tried (local-mailbox port 18143 is the non dovecot imap 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 mailbox_list_index=no -v -D backup -R -f -u user at example.org -m Sent imapc:
>>
>> and got the following error:
>>
>> dsync(user at example.org): Fatal: dsync backup: Looks like you're trying to run backup in wrong direction. Source is empty and destination is not.
> Strange. -R is supposed to make it copy from imapc to mdbox.. Have you tried if Dovecot can see mails at all from the remote server? Try doveadm -o mail=imapc: -o ... fetch instead of doveadm backup command.
You're right it was an error in my setup that caused this problem. After 
fixing that problem it now works as expected. The only thing I don't get 
working is running it via the doveadm-server socket with:

/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 mailbox_list_index=no -v -D backup -S 
/var/run/dovecot-director/doveadm-server -R -u user at example.org imapc:

In the logfile on the server there is the following error message:

Jun 25 20:01:26 10.129.3.200 dovecot: dsync(user at example.org): Error: 
user user at example.org: Initialization failed: Initializing mail storage 
from mail_location setting failed: imapc: missing imapc_host
Jun 25 20:01:26 10.129.3.200 dovecot: dsync(user at example.org): Fatal: 
User init failed

So I think that all the -o configurations aren't transfered via the 
doveadm-server socket.

>> As the dovecot imap account is newly created and therefore empty it seams to try to backup from the dovecot imap server to the non dovecot imap server. So i tried instead:
>>
>> /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 mailbox_list_index=no -v -D backup -f -u user at example.org -m Sent imapc:
> Now this is copying from mdbox to imapc, which is also why you're getting the crash:
>
>> Sometimes (every other time?) i got the following segmentation fault:
>>
>> bt
>> #0  0x00007f15e2c9ed74 in strcasecmp () from /lib/libc.so.6
>> #1  0x00007f15e327eaff in imapc_save_callback (reply=0x7fff56096a70, context=<value optimized out>) at imapc-save.c:168
> Note how it's saving a mail to imapc. But still, that's a bug, fixed: http://hg.dovecot.org/dovecot-2.1/rev/20703dbd1168
>
>> dsync(user at example.org): Warning: Destination mailbox Sent has been modified, need to recreate it before we can continue syncing
> I think this is also because it's going to wrong direction.
Yes, the problem there was that it was the wrong direction.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: director.conf.txt
URL: <http://dovecot.org/pipermail/dovecot/attachments/20120625/c0ed84e9/attachment-0004.txt>


More information about the dovecot mailing list