[Dovecot] move mail from server with v1.0 to server w. v2.1?

Reindl Harald h.reindl at thelounge.net
Wed Feb 6 12:27:50 EET 2013



Am 06.02.2013 11:10, schrieb Steffen Kaiser:
> On Mon, 4 Feb 2013, Frank wrote:
> 
>> Steffen Kaiser wrote:
>>> On Fri, 1 Feb 2013, Frank Lienhard wrote:
>>>
>>>> My first attempt was tho simply rsync the Maildirs along with the homes. Both deovecot versions are set up with
>>>> the maildir format, but this results in ~30% doublicated mails on the new server.
>>>
>>> Er, a) you got 30% more files on the new server (aka target), than you have on the old server (aka source)??
>>>
>>> b) Or do you see them, when you login via IMAP to the the new server?
>>>
>>> ===
>>>
>>> If a), did you ran rsync, while the source host is in production still? Do you use "H" option to preserve
>>> hardlinks and/or "--delete" if you run rsync multiple times?
>>>
>>> If b), did you verified the duplication with a IMAP client, that does _no_ caching on its own or with a fresh
>>> and empty local cache / profile / ... .
>>>
>> I used -avu, where:
>> -a equals: -rlptgoD (no -H,-A,-X)
>> -u  skip file that are newer on the receiver
> 
>> I stopped the getmail cronjob to ensure that no new messages get fetched while sync. After that I created a new
>> account in Icedove and at first all went well, but after a while I got duoplicates of abou 900 old messages.
>> I admit I only looked that up from Icedove and not in the dir from cli.
> 
> When you rsync'ed multiple times, you _must_ use "--delete" as well, because in Maildir status changes, such as
> "read", "seen", "replied", lables a.s.o., are reflected by changing the filename of the messages. Hence, without
> "--delete" you get the same message multiple times with different status or labels.
> 
> I tried it myself and had 1:1 copies of the mailboxes, regardless if I use the same or a fresh profile in Thunderbird.
> 
> I use: rsync -essh -vaH --delete from/ target:/.../to/

generally you should use options to REALLY make a folder
a 1:1 copy, the params below are used by me since many
years for ANY sort of folder sync

--delete-after -tPrlHpogEAX

# -z compress
# -t timestamps
# -P progress
# -r recursive
# -l links
# -H hard-links
# -p permissions
# -o owner
# -g group
# -E executability
# -A acls
# -X xtended attributes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://dovecot.org/pipermail/dovecot/attachments/20130206/cc8c6d9e/attachment-0004.bin>


More information about the dovecot mailing list