Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Move accounts between servers except mail

Discussion in 'General Discussion' started by Rogerio, Jun 26, 2018.

Tags:
  1. Rogerio

    Rogerio Active Member

    Joined:
    Sep 26, 2016
    Messages:
    27
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Sao Paulo, Brazil
    cPanel Access Level:
    Root Administrator
    Hello,

    I have a dedicated server with some accounts, but 3 of them have, together, more than 1 Tb of IMAP mail messages. Both servers are 100 mbits only, and will take a lot of time to transfer.

    My ideia is transfer the accounts except the "mail" folders. Reason: I can rsync the mail folders to a separated folder on the new server before transfer everything else and change the DNS. Everyday I can rsync only changes until the migration day. And then do a final rsync in the migration day, replace the "empty" folder with that rsync'ed, transfer everything else (website, mysql, email accounts (passwords), DNS and so), restoring the latest version of /home/user folder.

    Any ideas how to accomplish this? I need to do everything in one sunday, so the Transfer Tool for immediate change is not possible.

    Thanks.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,943
    Likes Received:
    1,821
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @Rogerio,

    The easiest approach would be to uncheck Copy Home Directory for those three accounts when using WHM >> Transfer Tool to copy the accounts to the destination server. Then, use rsync to manually transfer the data from the home directories for those accounts (/home/$username/) as needed and in the order you prefer.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Rogerio likes this.
  3. Rogerio

    Rogerio Active Member

    Joined:
    Sep 26, 2016
    Messages:
    27
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Sao Paulo, Brazil
    cPanel Access Level:
    Root Administrator
    Hello @cPanelMichael

    great, question: unchecking "Copy Home Directory" will not affect any data, like mail passwords, MySQL databases, etc? Just a rsync and set owner is enough?

    Rogerio
     
  4. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    1,835
    Likes Received:
    134
    Trophy Points:
    118
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    HI @Rogerio

    MySQL databases are stored in the MySQL directory not in /home/$user so they would be unaffected. I would ensure that when you perform the rsync you include all folders besides mail if you want to do that separately.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Rogerio likes this.
  5. Rogerio

    Rogerio Active Member

    Joined:
    Sep 26, 2016
    Messages:
    27
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Sao Paulo, Brazil
    cPanel Access Level:
    Root Administrator
  6. Rogerio

    Rogerio Active Member

    Joined:
    Sep 26, 2016
    Messages:
    27
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Sao Paulo, Brazil
    cPanel Access Level:
    Root Administrator
    Hello @cPanelMichael and @cPanelLauren

    Worked, thank you. But I had to set new GID and UID to each folder on /home/user. How can I fix owner and permissions since the UID/GID are differents in the new server?

    And, doing this way, it didnt create /etc/apache2/logs/domlogs/user folder (symlinked on /home/user).

    Thanks.
     
    #6 Rogerio, Jul 3, 2018
    Last edited: Jul 3, 2018
  7. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    1,835
    Likes Received:
    134
    Trophy Points:
    118
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Rogerio

    You should be able to use chown or usermap/groupmap as described in the rsync man page:

    Code:
                --usermap=STRING        custom username mapping
                --groupmap=STRING       custom groupname mapping
                --chown=USER:GROUP      simple username/groupname mapping
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Rogerio likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice