Recommend how to move 31GB of mail to a new server
Rob Mueller
robm at fastmail.fm
Sun Jun 24 20:40:12 EDT 2007
> Would it be possible to use replication for this?
>
> Set up a replica of the first server, copy while both servers online.
> Then take first server offline and change IPs/servernames/whatever.
Yes, it's definitely possible, but potentially quite a bit of work.
We actually have some modules that use replication to allow you to move one
user at a time between arbitrary servers. Basically it:
1. Creates a new temporary cyrus config dir with db,quota,sieve,user
sub-dirs
2. Generates on the fly a new imapd.conf file with the appropriate sync_*
params
3. Creates a new mailboxes.db with just the user directories (it hacks the
partition to be the same as the destination one wanted, but makes the dirs
in the temp imapd.conf for that partition point to the old place)
4. symlinks the users seen,sub,quota,sieve files to the new tmp config dir
5. Runs a sync_client -u to copy the user
This basically allow arbitary moving of any single user from any server to
any other server on any partition.
The nice thing is this can happily run while the user is logged in and doing
stuff. Once it's run once, we then disable logins and email deliveries for
the user and disconnect them from any imap/pop session, run the sync again
(generally very quick), update the db with which server they're on, then
re-enable them again. It's quite neat.
Unfortunately the code isn't really a releaseable state, there's too many FM
only assumptions and details in it.
Rob
More information about the Info-cyrus
mailing list