Migration

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Migration

Hans Brage
Hi!

I'm currently running an small imap-server on Dovecot 2.2.4 but will
retire that server. I've set up an new server with Dovecot 2.3.4 and
will migrate the mailboxes (maildir-format) from the old to the new
server. I'm planning to restructure the accounts a bit when migrating so
I need to move them one by one. Its only a few so thats not a big issue.

Both servers are using virtual accounts (users file).

I've understood that best method for migration is to run doveadm backup
-R from the new server. But I really cant figure out what other
parameters or settings that I need to perform that task and if it should
be run as user vmail or root.

Would be greatful for any tips, hints, links or similiar.

Regards,
Hans



Reply | Threaded
Open this post in threaded view
|

Re: Migration

Dovecot mailing list
Hans Brage skrev den 2018-12-29 22:49:

> Would be greatful for any tips, hints, links or similiar.

if you want external tools i think imapsync is best way to sync all, it
can keep source or delete, so you have backup in case of errors, it does
not sync sieve, this is still not makeed, so each user must self copy
sieve scripts from old to new via webmail or thunderbird with sieve
plugin
Reply | Threaded
Open this post in threaded view
|

Re: Migration

Sami Ketola
In reply to this post by Hans Brage

> On 29 Dec 2018, at 23.49, Hans Brage <[hidden email]> wrote:
>
> Hi!
>
> I'm currently running an small imap-server on Dovecot 2.2.4 but will retire that server. I've set up an new server with Dovecot 2.3.4 and will migrate the mailboxes (maildir-format) from the old to the new server. I'm planning to restructure the accounts a bit when migrating so I need to move them one by one. Its only a few so thats not a big issue.
>
> Both servers are using virtual accounts (users file).
>
> I've understood that best method for migration is to run doveadm backup -R from the new server. But I really cant figure out what other parameters or settings that I need to perform that task and if it should be run as user vmail or root.
>
> Would be greatful for any tips, hints, links or similiar.


Once you have the new server set up, you can use dsync over ssh to sync the mailboxes with something like:

doveadm backup -u user@newserver -R ssh sudouser@oldserver sudo /usr/bin/doveadm dsync-server -u user@oldserver

needs to be run as root on new server. Also ssh access with keys and without password is recommended.

Sami


Reply | Threaded
Open this post in threaded view
|

Re: Migration

Hans Brage
Thanks!

That was a really useful answer.

// Hans


Den 2018-12-30 kl. 10:53, skrev Sami Ketola:

>> On 29 Dec 2018, at 23.49, Hans Brage <[hidden email]> wrote:
>>
>> Hi!
>>
>> I'm currently running an small imap-server on Dovecot 2.2.4 but will retire that server. I've set up an new server with Dovecot 2.3.4 and will migrate the mailboxes (maildir-format) from the old to the new server. I'm planning to restructure the accounts a bit when migrating so I need to move them one by one. Its only a few so thats not a big issue.
>>
>> Both servers are using virtual accounts (users file).
>>
>> I've understood that best method for migration is to run doveadm backup -R from the new server. But I really cant figure out what other parameters or settings that I need to perform that task and if it should be run as user vmail or root.
>>
>> Would be greatful for any tips, hints, links or similiar.
>
> Once you have the new server set up, you can use dsync over ssh to sync the mailboxes with something like:
>
> doveadm backup -u user@newserver -R ssh sudouser@oldserver sudo /usr/bin/doveadm dsync-server -u user@oldserver
>
> needs to be run as root on new server. Also ssh access with keys and without password is recommended.
>
> Sami
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Migration

Ignacio Garcia
A totally different approach (that is imap-server agnostic), providing
that you're setting up those new accounts with temporary passwords
(which you know), before users change their passwords to their liking:
you could also use imapsync ( https://github.com/imapsync/imapsync) . We
here use it with a batch file and a text file containing all accounts to
do mass-migrations, usually at night, when there's little to none user
interaction with their mail accounts. I like this approach because mail
service never gets interrupted and we do programmed syncs all night in
case DNS propagation takes more than expected and mail still arrives to
the old server.

Ignacio


El 30/12/2018 a las 23:09, Hans Brage escribió:

> Thanks!
>
> That was a really useful answer.
>
> // Hans
>
>
> Den 2018-12-30 kl. 10:53, skrev Sami Ketola:
>>> On 29 Dec 2018, at 23.49, Hans Brage <[hidden email]> wrote:
>>>
>>> Hi!
>>>
>>> I'm currently running an small imap-server on Dovecot 2.2.4 but will
>>> retire that server. I've set up an new server with Dovecot 2.3.4 and
>>> will migrate the mailboxes (maildir-format) from the old to the new
>>> server. I'm planning to restructure the accounts a bit when
>>> migrating so I need to move them one by one. Its only a few so thats
>>> not a big issue.
>>>
>>> Both servers are using virtual accounts (users file).
>>>
>>> I've understood that best method for migration is to run doveadm
>>> backup -R from the new server. But I really cant figure out what
>>> other parameters or settings that I need to perform that task and if
>>> it should be run as user vmail or root.
>>>
>>> Would be greatful for any tips, hints, links or similiar.
>>
>> Once you have the new server set up, you can use dsync over ssh to
>> sync the mailboxes with something like:
>>
>> doveadm backup -u user@newserver -R ssh sudouser@oldserver sudo
>> /usr/bin/doveadm dsync-server -u user@oldserver
>>
>> needs to be run as root on new server. Also ssh access with keys and
>> without password is recommended.
>>
>> Sami
>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: Migration

Sami Ketola


> On 31 Dec 2018, at 12.22, Ignacio García <[hidden email]> wrote:
>
> A totally different approach (that is imap-server agnostic), providing that you're setting up those new accounts with temporary passwords (which you know), before users change their passwords to their liking: you could also use imapsync ( https://github.com/imapsync/imapsync) . We here use it with a batch file and a text file containing all accounts to do mass-migrations, usually at night, when there's little to none user interaction with their mail accounts. I like this approach because mail service never gets interrupted and we do programmed syncs all night in case DNS propagation takes more than expected and mail still arrives to the old server.


I still don't recommend to use imapsync for migrations as UIDVALIDITY and UID numbers will change and end users will need to invalidate their local client caches and redownload all mail headers and usually also mail bodies again.

Sami
Reply | Threaded
Open this post in threaded view
|

Re: Migration

Tanstaafl
In reply to this post by Ignacio Garcia
On 12/31/2018, 5:22:48 AM, Ignacio García <[hidden email]> wrote:

> A totally different approach (that is imap-server agnostic), providing
> that you're setting up those new accounts with temporary passwords
> (which you know), before users change their passwords to their liking:
> you could also use imapsync ( https://github.com/imapsync/imapsync) . We
> here use it with a batch file and a text file containing all accounts to
> do mass-migrations, usually at night, when there's little to none user
> interaction with their mail accounts. I like this approach because mail
> service never gets interrupted and we do programmed syncs all night in
> case DNS propagation takes more than expected and mail still arrives to
> the old server.

Or, you can use Master Passwords on both sides, and just do the
migration at your leisure. I did this when migrating from our dovecot
server to Office 365.

Next time I'll look at using a dovecot method (DSync? doveadm?) but
still using Master Passwords.
Reply | Threaded
Open this post in threaded view
|

Re: Migration

Dovecot mailing list
In reply to this post by Sami Ketola
Am 30.12.18 um 10:53 schrieb Sami Ketola:

>
>> On 29 Dec 2018, at 23.49, Hans Brage <[hidden email]> wrote:
>>
>> Hi!
>>
>> I'm currently running an small imap-server on Dovecot 2.2.4 but will retire that server. I've set up an new server with Dovecot 2.3.4 and will migrate the mailboxes (maildir-format) from the old to the new server. I'm planning to restructure the accounts a bit when migrating so I need to move them one by one. Its only a few so thats not a big issue.
>>
>> Both servers are using virtual accounts (users file).
>>
>> I've understood that best method for migration is to run doveadm backup -R from the new server. But I really cant figure out what other parameters or settings that I need to perform that task and if it should be run as user vmail or root.
>>
>> Would be greatful for any tips, hints, links or similiar.
>
>
> Once you have the new server set up, you can use dsync over ssh to sync the mailboxes with something like:
>
> doveadm backup -u user@newserver -R ssh sudouser@oldserver sudo /usr/bin/doveadm dsync-server -u user@oldserver
>
> needs to be run as root on new server. Also ssh access with keys and without password is recommended.

I used to run `doveadm backup` on the new server with glusterfs and at the
middle of the sync the glusterfs is gone. Have anyone good experience with
glusterfs and `doveadm backup/sync`?

> Sami

Regards
Aleks
Reply | Threaded
Open this post in threaded view
|

Re: Migration

Dovecot mailing list


On 1 Oct 2019, at 11.29, Alex La via dovecot <[hidden email]> wrote:

Am 30.12.18 um 10:53 schrieb Sami Ketola:

On 29 Dec 2018, at 23.49, Hans Brage <[hidden email]> wrote:

Hi!

I'm currently running an small imap-server on Dovecot 2.2.4 but will retire that server. I've set up an new server with Dovecot 2.3.4 and will migrate the mailboxes (maildir-format) from the old to the new server. I'm planning to restructure the accounts a bit when migrating so I need to move them one by one. Its only a few so thats not a big issue.

Both servers are using virtual accounts (users file).

I've understood that best method for migration is to run doveadm backup -R from the new server. But I really cant figure out what other parameters or settings that I need to perform that task and if it should be run as user vmail or root.

Would be greatful for any tips, hints, links or similiar.


Once you have the new server set up, you can use dsync over ssh to sync the mailboxes with something like:

doveadm backup -u user@newserver -R ssh sudouser@oldserver sudo /usr/bin/doveadm dsync-server -u user@oldserver

needs to be run as root on new server. Also ssh access with keys and without password is recommended.

I used to run `doveadm backup` on the new server with glusterfs and at the
middle of the sync the glusterfs is gone. Have anyone good experience with
glusterfs and `doveadm backup/sync`?


No. I only have bad and very bad experiences with glusterfs in general. Too many corruptions and unsync metadata (even with one node setup) that we migrated customer away from it and they are now using nfs instead.

Sami

Reply | Threaded
Open this post in threaded view
|

Re: Migration

Dovecot mailing list
Am 01.10.19 um 10:32 schrieb Sami Ketola via dovecot:

>
>
>> On 1 Oct 2019, at 11.29, Alex La via dovecot <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>> Am 30.12.18 um 10:53 schrieb Sami Ketola:
>>>
>>>> On 29 Dec 2018, at 23.49, Hans Brage <[hidden email]
>>>> <mailto:[hidden email]>> wrote:
>>>>
>>>> Hi!
>>>>
>>>> I'm currently running an small imap-server on Dovecot 2.2.4 but will retire
>>>> that server. I've set up an new server with Dovecot 2.3.4 and will migrate
>>>> the mailboxes (maildir-format) from the old to the new server. I'm planning
>>>> to restructure the accounts a bit when migrating so I need to move them one
>>>> by one. Its only a few so thats not a big issue.
>>>>
>>>> Both servers are using virtual accounts (users file).
>>>>
>>>> I've understood that best method for migration is to run doveadm backup -R
>>>> from the new server. But I really cant figure out what other parameters or
>>>> settings that I need to perform that task and if it should be run as user
>>>> vmail or root.
>>>>
>>>> Would be greatful for any tips, hints, links or similiar.
>>>
>>>
>>> Once you have the new server set up, you can use dsync over ssh to sync the
>>> mailboxes with something like:
>>>
>>> doveadm backup -u user@newserver -R ssh sudouser@oldserver sudo
>>> /usr/bin/doveadm dsync-server -u user@oldserver
>>>
>>> needs to be run as root on new server. Also ssh access with keys and without
>>> password is recommended.
>>
>> I used to run `doveadm backup` on the new server with glusterfs and at the
>> middle of the sync the glusterfs is gone. Have anyone good experience with
>> glusterfs and `doveadm backup/sync`?
>
>
> No. I only have bad and very bad experiences with glusterfs in general. Too many
> corruptions and unsync metadata (even with one node setup) that we migrated
> customer away from it and they are now using nfs instead.

Thank you for your fast answer. I had some issues with glusterfs in the
migration startup phase and wanted to know if this is only my experience or
someone else also.

We are now moving away from glusterfs and use dedicated storage.

> Sami

Regards
Alex