[Web-cyradm] Moving to another server

Bjoern B bb at ic-marl.de
Mon Jul 9 18:37:50 CEST 2007


Hi,

i think imapsync will do your work.

Make a "initial" sync between the servers and a "final" sync on the day 
of changeover.

But be carefull.
If you sync the mailboxes, without the right commandline switch, you run 
in trouble with outlook users. outlook displays the time when the email 
arrives the server, not the sending time. And after syning all Mails are 
from the changeover day :(

But there is a commandline switch to avoid this trouble. Can´t remember 
the syntax now..

Imapsync needs time for the "initial" sync, but i think that you can do 
this on normal working days.
I have done this when migrating from qmail to cyrus for our domains.

Then change to maildelivery to the new server and make a "final" sync.
This final sync will go quick and all users have their mail on the new 
server.

The Problem is, that you need alle usernames AND passwords.

bye

b²

George Kontostanos schrieb:
> Hi Sruart and thanks for your valuable info.
> So far I have managed to reconstruct almost everything except for the
> actual emails that are stored on the old server. Odd think I noticed
> that in the old server the mail directory had a structure of /mail/ a
> b c .. whereas the new doesn't. I'm looking into it.
> In any case the old mail server is still production has 17G hard disk
> space and 84% disk usage. (yes one partition) So, I'm moving with
> careful steps here.
> 
> Thanks again.
> 
> George
> 
> On 7/9/07, Stuart Murray-Smith <eight32 at gmail.com> wrote:
>> Hi George
>>
>> > Do you mean the log files of the new server ?
>>
>> Apologies, I think I misread your original post.
>>
>> > Btw. In the old server I have:
>> > ls /var/lib/cyrus
>> > drwxr-x---   11 cyrus    mail         4.0K Jul  9 09:38 .
>> > drwxr-xr-x   23 root     root         4.0K Dec 24  2004 ..
>> > drwx------    2 cyrus    mail         4.0K Jul  7 15:38 db
>> > drwx------    2 cyrus    mail         4.0K Jul  9 09:38 db.backup1
>> > drwx------    2 cyrus    mail         4.0K Jul  9 09:08 db.backup2
>> > -rw-------    1 cyrus    mail          18M Jul  9 09:38 deliver.db
>> > drwx------    2 cyrus    mail         4.0K May 11  2004 log
>> > -rw-------    1 cyrus    mail         209K Jul  5 16:07 mailboxes.db
>> > drwx------    2 cyrus    mail         4.0K May 11  2004 msg
>> > drwx------    2 cyrus    mail         4.0K Jul  9 09:43 proc
>> > drwx------   28 cyrus    mail         4.0K May 11  2004 quota
>> > drwxr-x---    2 cyrus    mail         4.0K May 12  2004 socket
>> > -rw-------    1 cyrus    mail         8.0K May 12  2004 tls_sessions.db
>> > drwx------   28 cyrus    mail         4.0K May 11  2004 user
>> >
>> > Any idea on how to move those to the new server? I suspect that the 
>> problem
>> > is here.
>>
>> Yes, I asked the list this question about 10 months ago. Here are some
>> of the replies I received:
>>
>> =====8<-------
>>
>> Create the mailbox, copy the 4GB into it, remove all cyrus.* files and
>> run reconstruct (as user cyrus) and the quota (as user cyrus).
>>
>> =====8<-------
>>
>> Take a look to: "imapsync"
>>
>> =====8<-------
>>
>> A brief summary below is about backup restore procedures:
>>
>> 1) Make a dump of all mailboxes to the text file:
>>
>> su - cyrus -c "ctl_mboxlist -d" > /var/lib/imap/mailboxlist.txt
>>
>> And restore it with:
>>
>> su - cyrus -c "ctl_mboxlist -u" < /var/lib/imap/mailboxlist.txt
>>
>> 2) Make a regular backups (in my case with DSM client) of
>> /var/spool/imap/ and /var/lib/imap/, without stopping cyrus, in this
>> case I endanger myself in some data inconsistency and maybe some
>> e-mails lost (which were in process while backup was running).
>>
>> 3) In case of disaster I can just copy mail directly from the backup
>> to the mail store directory (/var/spool/imap/user/%username%),
>> And run:
>> /usr/lib/cyrus/bin/reconstruct -rf user/username
>>
>>
>> 4) All quotas (in /var/lib/imap/quota/%firstletter of username%/)will
>> not be reconstructed, so I'll need to do it manually.
>>
>> 5) All subscription and seen info (in /var/lib/imap/user/%firstletter
>> of username%/) will not be reconstructed, but I could restore it from
>> the regular backup.
>>
>> =====8<-------
>>
>> rdiff-backup
>>
>> =====8<-------
>>
>> I've used most recommendations above for various other requirements to
>> a high degree of success :-)
>>
>> Please let us know how it goes.
>>
>> Have a great day!
>>
>> Regards,
>>
>> Stu@
>> _______________________________________________
>> This mailing list is hosted and supported
>> by bit-heads GmbH | http://www.bit-heads.ch
>>
>> _______________________________________________
>> Web-cyradm mailing list
>> Web-cyradm at web-cyradm.org
>> http://www.web-cyradm.org/mailman/listinfo/web-cyradm
>>
> _______________________________________________
> This mailing list is hosted and supported
> by bit-heads GmbH | http://www.bit-heads.ch
> 
> _______________________________________________
> Web-cyradm mailing list
> Web-cyradm at web-cyradm.org
> http://www.web-cyradm.org/mailman/listinfo/web-cyradm
> 
> 
> 
> 




More information about the Web-cyradm mailing list