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.

Moving customer sites from dedicated server (Root WHM) to reseller WHM

Discussion in 'General Discussion' started by mspicer182, May 3, 2012.

  1. mspicer182

    mspicer182 Registered

    Joined:
    May 3, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I have read and read all the threads that say this is not possible and that it can't be done... I don't respect "can't" now that that is out of the way here is my story:

    I have a dedicated server with WHM/Cpanel and root access. I have some 20 customers on that server. The hardware has had lots of failures and the hosting company responsible for it has become difficult to work with. In addition it is super expensive for a crappy Pentium D server. I started moving customers off that server and onto Bluehost's Re-seller WHM service. I discovered a number of hang ups.

    1. No restore option from the reseller WHM interface to easily restore accounts to this provider.
    2. No access to /scripts from SSH to manually restore data
    3. No help from support staff to move my existing websites. Bluehost staff informed me they do not support moving from other WHM/Cpanel systems because they are running a custom version and it will break things.

    Being the tenacious sysadmin that I am, I was able to first move all the data files from the dedicated server to bluehost. Then I realized that I needed to move email. This is a problem because you can't just copy email files like you can html/php/etc files. I discovered that there is a shadow file and CPanel uses the exact same hash for the passwords across all systems. I created a csv list of passwords and temporary passwords from the Clients Cpanel and then on Bluehost's Cpanel for the client I uploaded that list. I logged in with SSH and discovered that I have no access to the shadow file for the client. In fact my SSH was so restricted it seems i am jailed to a user privilege and I can't access any of the accounts I create in WHM.

    I called support again and they said I had as much SSH access as I can get. So being more tenacious and now frustrated (usually good combo) I discovered that I ould read and write to the shadow file for the email accounts with a sweet PHP script. So I was able to take the hashes from the dedicated server's shadow file and then copy them to the new server. Sweet, now I have website data, and email accounts. What's that you say? No actual emails??!?!?! For accounts I knew the password for I was able to use IMAP and copy between the 2 servers, but this is not ideal at all.

    So here I am thinking I was nearly done and just needed to repeat this for the other 19 clients... but then I realized some of them have MySQL. Ok no problem, login mysql dump and import right? NOPE, Cpanel uses the "username_" to create databases and on Bluehost it automatically creates the username. You can't edit it or modify it in any way, I tried. So now if I am going to move the database I have to edit all the configs and who knows what else is hard coded to the database and user name.

    So here is my plea, does anyone have any ideas on how to copy the actual email messages and to change the username for accounts created in a WHM reseller environment? Or does anyone have any idea on how to make the move easier? I already know, "Get a dedicated/VPS server" but honestly it is so overkill for the very very basic websites we host. Let me know your thoughts.

    Thanks,

    Mike
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,814
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    The following thread includes a document on manual migrations that should be useful for helping you to transfer the emails:

    Manual Migrations

    If you create the account with the same username, you should be able to match the database names on the destination server. Otherwise, if your host is not willing to allow you to restore backup files, you would need to import the MySQL databases into the new database name and update the scripts.

    Thank you.
     
  3. wyckliffe

    wyckliffe Registered

    Joined:
    Feb 15, 2013
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hey,

    I have a vps too but its been behaving badly and i wont to move to a reseller cpanel (ALL).

    Can i use the transfer option in WHM to move from vps to reseller at once so i dont have a long process?

    Thanks.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,814
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Root access to WHM is required in order to access the account transfer features and functionality. It is not possible for a reseller to do this without being granted root privileges in WHM.

    Thank you.
     
Loading...

Share This Page