The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

rsync mail directory after migration?

Discussion in 'E-mail Discussions' started by room9, Feb 3, 2013.

  1. room9

    room9 Member

    Joined:
    Jul 17, 2011
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    We're planning a migration from one hosting provider to another, both using cPanel. We're going to backup each account, copy across to the new server and restore. After restoration we'll change the MX records on the old server to point to the new server.

    The only problem is what happens with email arriving while backup, copy and restore are happening.

    Can I simply use rsync to update the new server with any late arriving emails after making the MX record change? E.g.

    Code:
    rsync cpaccount@oldserverip.com:~/mail/ cpaccount@newserverip.com:~/mail/
    Are there requirements here? E.g. both servers need to run courier or both dovecot? Same versions? How do I tell? Are there any permissions issues I need to deal with?
     
    #1 room9, Feb 3, 2013
    Last edited: Feb 3, 2013
  2. ruzbehraja

    ruzbehraja Well-Known Member

    Joined:
    May 19, 2011
    Messages:
    383
    Likes Received:
    7
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
  3. room9

    room9 Member

    Joined:
    Jul 17, 2011
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Is there a reason for this? I've seen other posts mentioning that rsyncing just ~/mail will work.
     
  4. ruzbehraja

    ruzbehraja Well-Known Member

    Joined:
    May 19, 2011
    Messages:
    383
    Likes Received:
    7
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    You would want to keep the whole account in sync and not just the mail folder, to ensure that any changes to the email settings / quotas etc are not affected and remain consistent.

    Else, it will def. work, just how copying email files will work. But I do not recommend it.
     
  5. Jeff Shotnik

    Jeff Shotnik Well-Known Member

    Joined:
    Oct 10, 2012
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Denver, Colorado, United States
    cPanel Access Level:
    DataCenter Provider
    I highly recommend that you use imapsysnc. Imapsync the two mailboxes post migration to sync up the target inbox - /http://linux.die.net/man/1/imapsync
     
Loading...

Share This Page