• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Migrating to new server - how to deal with old mail?

C

codesmith

Guest
We're planning our migration from a Plesk 7.5.4 server to a 8.1 server. The Migration Manager works pretty well so we're planning to schedule doing that and then have a DNS update soon thereafter to propogate the new server IP about.

So it will take time for the propogation and it's likely that mail will get delivered to the old server. So any mail will have to be moved to the new server. Any ideas on how to either prevent this from happening or an easy way to move the mail? We're talking 100s of mailboxes so need to automate.
 
Probably just a directory rsync will help.

As the final migration step run a kind of:
rsync -e ssh -azv --delete /var/qmail/mailnames/ root@destination:/var/qmail/mailnames/
to synchronize mail directories.
 
Thanks for the great idea.

Just to follow up on the particulars since this took awhile to get right. After the server switch was made we waited a couple of days for the DNS to switch over and then shut down the mail on the older server so no new mail would come in. Then to get the mail in the /new directories that users hadn't seen yet over to the new server.

Our config is a qmail setup. Both oldserver.com and newserver.com have symbolic link set up so that /mail goes to the root of the qmail directory. ie. a mail account 'test' is at /mail/oldserver.com/test/

We set up 'incl' as an include file for rysnc. We wanted only files in the /new directories for all mail accounts for all domains. It contains:

+ /*/
+ /*/*/
+ /*/*/Maildir/
+ /*/*/Maildir/new/
+ /*/*/Maildir/new/**
- *

The command run from oldserver.com is:
(run from the /mail directory)
rsync -e ssh -azv --include-from=incl /mail/ [email protected]:/mail/

You should definitely test this on test directories first. Also you can use the --dry-run option before doing it to make sure it's doing what you want. Setting up the include file is tricky as well.
 
Back
Top