David Wright wrote:
> 
> > doc/install-upgrade.html
> 
> This information assumes you are upgrading on one box. My situation (and
> I suspect it is the situation of most production systems) is having 2.1
> set up clean (i.e. no mail or metadata) on a second machine, and now I
> want to get all the mail from my 2.0 machine to it, without upgrading
> the 2.0 machine. This insures that falling back to the old server is
> trivial, in case the upgrade fails.
> 
> The documentation doesn't discuss at all how to transfer mailstores
> between machines. I think this is what Patrick and I both want to know.

The document above should still be referenced because it will give you
an idea of what other (if any) changes might have to be made.  For
migration here are some instruction off of my top of my head (I make no
warranties, etc):

The most important thing to remember is that the server(s) should not be
running as you read/write the data.  

0. Make sure you have run 'tools/mkimap' on the new server.  This will
create all of the directory trees.

1. Move '/var/spool/imap' from the old server to the new (tar, cpio,
rsync, etc).  This is all of your mailboxes and messages.
 
2. Move '/var/imap/user' from the old server to the new.  This is all of
the user subscriptions and message seen state (seen state _may_ not work
correctly, but it should as long as both server use the 'flat' backend).

3. Move '/var/imap/quota' from the old server to the new.  This is all
of the user quota info.

4. Check the permissions on these directory trees to make sure all of
the files/dirs are owned by 'cyrus' (and 
probably group 'mail').

5. Run 'ctl_mboxlist -d /tmp/mailboxes.txt on the old server.  This will
dump your mailboxes database to a 
portable format.

6. Move '/tmp/mailboxes.txt' from the old server to the new (put it in
/tmp, which is probably mounted on swap 
for speed).

7. Run 'ctl_mboxlist -u -f /tmp/mailboxes.db < /tmp/mailboxes.tmp'. 
This will load your new mailboxes database using your current format.
 
8. Move '/tmp/mailboxes.db' to '/var/imap/mailboxes.db'

9. [OPTIONAL] Move the contexts of your sieve directory from the old
server to the new.

10. Start up the new server and see what happens.

-- 
Kenneth Murchison     Oceana Matrix Ltd.
Software Engineer     21 Princeton Place
716-662-8973 x26      Orchard Park, NY 14127
--PGP Public Key--    http://www.oceana.com/~ken/ksm.pgp

Reply via email to