I need to move, make exact copy from one dovecot server v.2.0.19 on Ubuntu 12.04.5 LTS to another server, dovecot 2.2.22 running on Ubuntu 16.04.1 LTS. The task is everything to be as smooth as possible and the users of the email accounts to not lose any information. All IMAP folders structure should be preserved intact. The users should use only the new server in the future.

I found dsync as suitable command, however it seems that I can not use it to migrate from dovecot 2.0 to 2.1 or 2.2. dsync requires v.2.1.4+. So I decided to first upgrade the source server to whatever v. 2.1.4+. However I don't know how to do this. It is server with lot's of things on it like spamassasin, ISPconfig etc.

So how should I upgrade the server? I found an answer here in another thread however when I tried it I got an error messages and everything went wrong.

Please provide me with step by step how to. Thanks a lot.

1 Answer 1


One possibility is to use dsync's backup command. This is a one-way replication from the old system to the new setup by having the new Dovecot server acting as an IMAP client. dsync can not only be used in-between different versions of dovecot this way, but also for migrating data from other IMAP servers. Putting a proxy in front, you can even do live migration of large users bases without anybody noticing if done properly.

For a small setup (up to a few hundred gigabyte of mail information, a few hundred users), it might be more reasonable to just upgrade the existing mail system or rsync the mail data to the new system in a short downtime. Setting up dsync properly involves quite some preparation effort.

  • Thank you for this answer, but it is not clear to me. It is not for so many users, but the volume of emails is quite big.
    – Tomcat
    Oct 18, 2016 at 23:36
  • I mean that it is not clear to me at which server you suggest to run dsync's backup command - at the target new dovecot server, or at the old server? As far as I could understand from dovecot documentation at wiki2, it shoud run at the old machine from which I want to backup, but it is version not supported according to the same documentation.
    – Tomcat
    Oct 18, 2016 at 23:40
  • And, as I mentioned, I don't know how to upgrade it - I am not experienced enough, Need help for this.
    – Tomcat
    Oct 18, 2016 at 23:41
  • Also about rsync which you suggest, I am not sure if it will keep all what I need. Please specify in more detail, not only what should I do but how by commands line by line. Thanks.
    – Tomcat
    Oct 18, 2016 at 23:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .