[Dovecot] Script: Moving Maildirs between servers

mouss mouss at ml.netoyen.net
Tue Feb 3 00:07:19 EET 2009


Peter Lindgren a écrit :
> Hi,
> I just migrated from dovecot 1.0.rc29 to 1.1.7, from Sparc platform to
> Intel, it went very well.
> In the process I merged folders and excluded folders from being copied.
> User rights on folders were kept/set.
> I thought I'd share my migration script with you folks. If there's an
> interest to put it on the wiki I can do that, but I'm not sure in what
> page.
> Use it as a starter if you need to do this yourselves.
> Prerequisites:
>  * User names are local unix accounts
>  * Old server's /home must be mounted with nfs
>  * Structure and user names must match between the two systems
>  * Source dovecot must be at least version 1.0.x
>  * Destination dovecot must be 1.1.x
>  * Only dovecot data folders and files are copied, neither dovecot
> indices nor Sieve scripts etc.
> 
> Here it goes, have fun!
> /Peter
> 
> 
> #!/bin/sh
> #
> # Migrates dovecot Maildir folders and settings from older dovecot on
> # old server to new dovecot on new server.
> # Prerequisites:
> # * User names are local unix accounts
> # * Old server's /home must be mounted with nfs
> # * Structure and user names must match between the two systems
> # * Source dovecot must be at least version 1.0.x
> # * Destination dovecot must be 1.1.x
> # * Only dovecot data folders and files are copied, neither dovecot
> indices nor Sieve scripts etc.
> #

rsync would be simpler.


More information about the dovecot mailing list