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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Move accounts to new server

Discussion in 'Data Protection' started by rhm.geerts, Dec 5, 2017.

  1. rhm.geerts

    rhm.geerts Well-Known Member

    Joined:
    Jul 29, 2008
    Messages:
    91
    Likes Received:
    6
    Trophy Points:
    58
    Location:
    Maastricht
    cPanel Access Level:
    Root Administrator
    We want to move a Cpanel server with Centos 5 to another server in another data center with Centos 7.

    Now I read several threads and the documentation, from which I totally did not understand the part about changing to the old server's ip on the new server or why this should be necessary.
    I thought it could be easily done with the transfer tool. So I need some help.

    This is want we want to do.

    1.) Change main domain from old server to a new domain and new nameservers on the new server.
    So for example:
    domainold.tld with ns1 and ns2.domainold.tld to the new server otherdomain.tld with ns1 and n2s.otherdomain.tld which will be use for very account on the server.
    The reason is that the current domainold.tld is used for business and the owner want's to have it completely stand-alone like a shared account, so that domain's name is not used for nameservers anymore.

    2.) The new server will be installed using a new ip with hostname server.otherdomain.tld and ns1 and ns2.otherdomain.tld is that correct?

    3.) Migrate the complete configuration to the new server, using the new server's ip's for A records and the new nameservers.
    Can this easily be done with the transfer tool from Cpanel?

    4.) All accounts are now on Centos 5 using mysql 5.5.52. Centos 7 on the new server will probably use some MariaDB version by default. Can I expect any issues or are there things I need to (pre)configure for a smooth transfer?

    5.) Are there any other things I need to know about, change on the new server or anything else?

    6.) We would like to use mod_ruid on the new server, we're not using that on the old one at this moment. Is it possible to configure this before transferring the accounts, or has this to be done afterwards?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,802
    Likes Received:
    1,714
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    We provide a guide on how to do this at:

    How to Move All cPanel Accounts from One Server to Another - cPanel Knowledge Base - cPanel Documentation

    Note there are a couple of steps you can ignore based on the information you provided.

    1. You are seeking to use a new hostname and name servers. With that in mind, you can simply use the new domain name when configuring the hostname and name servers during the initial setup wizard after installing cPanel on the new server. Additionally, this guide is helpful for setting up new name servers:

    How to Set Up Nameservers in a cPanel Environment - cPanel Knowledge Base - cPanel Documentation

    2. Ignore the step referencing the IP address change sine you are using a new IP address.

    There are typically no issues during the upgrade from MySQL 5.5 to MariaDB 10.x, however we are happy to help you troubleshoot any issues that arise.

    Yes, you can use "WHM >> EasyApache 4" to configure Apache and PHP before starting the transfer:

    EasyApache 4 Home - EasyApache 4 - cPanel Documentation

    Thank you.
     
    rhm.geerts likes this.
  3. rhm.geerts

    rhm.geerts Well-Known Member

    Joined:
    Jul 29, 2008
    Messages:
    91
    Likes Received:
    6
    Trophy Points:
    58
    Location:
    Maastricht
    cPanel Access Level:
    Root Administrator
    Yep, as I've stated I had read that guide but was confused about the ip changes mentioned there.
    But due to your answer I presume this is only needed when there is a new server which will get the same ip('s) as the old server.

    Your answer to my question 1.) explains I can skip it.

    Thank you for answering the other questions too.
    Since question 5 was not answered, I presume I have my list fairly complete and I'm ready to go.

    Thank you!
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,802
    Likes Received:
    1,714
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Feel free to let us know if you encounter any issues during the migration, or have any additional questions.

    Thank you.
     
  5. rhm.geerts

    rhm.geerts Well-Known Member

    Joined:
    Jul 29, 2008
    Messages:
    91
    Likes Received:
    6
    Trophy Points:
    58
    Location:
    Maastricht
    cPanel Access Level:
    Root Administrator
    I have a little issue before transferring.

    I setup nameservers but userd 3, because one was added automatically, a datacenter nameserver.
    I only want two from the two ip's we got. I removed the 3rd from the Basic configuration, it's not displayed there anymore.

    However, it keeps getting mentioned when looking with "Nameserver Record Report", even after a reboot of the server.
    How can I remove it from there so only the really present nameservers are stated there?
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,802
    Likes Received:
    1,714
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The Nameserver Record Report option in WHM is simply displaying information from your existing DNS zones. Is it possible you transferred or created some accounts before removing that third-name server in "WHM >> Basic Configuration"? That option only applies to new DNS zones, so for the existing zones, you'd need develop a command based off the workarounds discussed on the following thread:

    How to remove a few DNS records from all zone files?
    Bulk DNS Zone Update
    Bulk DNS insert

    Or, if it's only a few domain names that already exist, simply remove the record manually using "WHM >> Edit DNS Zone".

    Thank you.
     
  7. rhm.geerts

    rhm.geerts Well-Known Member

    Joined:
    Jul 29, 2008
    Messages:
    91
    Likes Received:
    6
    Trophy Points:
    58
    Location:
    Maastricht
    cPanel Access Level:
    Root Administrator
    Yes, I created 1 account probably before removing that 3rd nameserver.

    I did that, so it's not present there anymore. There are 4 dns zones there.
    mydomain.com
    ns1.mydomain.com
    ns2.mydomain.com
    server.mydomain.com

    I editted all 4 manually and none of them have the 3rd nameserver present which is called robotns3.second-ns.com.
    I also searched with grep to find the ip in /var/named but that ip is not present anywhere in /var/named. Even checked them manually by editting the 4 files.

    Due the the last line, it seems none of the 3 solutions you provided will work, because of the lack of presence in those files.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,802
    Likes Received:
    1,714
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Try running the following command to make sure it's not just cached data you are seeing:

    Code:
    /scripts/updatenameserverips
    Thank you.
     
  9. rhm.geerts

    rhm.geerts Well-Known Member

    Joined:
    Jul 29, 2008
    Messages:
    91
    Likes Received:
    6
    Trophy Points:
    58
    Location:
    Maastricht
    cPanel Access Level:
    Root Administrator
    That did the trick, it was indeed cashed info!
     
    cPanelMichael likes this.
  10. rhm.geerts

    rhm.geerts Well-Known Member

    Joined:
    Jul 29, 2008
    Messages:
    91
    Likes Received:
    6
    Trophy Points:
    58
    Location:
    Maastricht
    cPanel Access Level:
    Root Administrator
    Found another pre-move question for you. :)
    The datacenter did some Cpanel preinstall. You have to login to WHM to configure the rest.
    What I see is that multiple versions of php get installed. Like php 5.5, 5.6 and 7.x. I don't mind and I also see that I can deselect them.
    But what happens with those, can the users select which php version they want to use?
    And what about mod_ruid2? I want to use that, but on another panel (DA) if mod_ruid2 is used, it's not possible to have multiple php version selections, that will only work when using php-fpm instead of mod_ruid2.

    So I'm a bit confused. Is it possible on Cpanel to have multiple php versions and still use mod_ruid2 on all?
    And if multiple php versions are installed, can the user choose which version to use? Which by the way makes it easy to see if their scripts are compatible with newer versions. :)
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,802
    Likes Received:
    1,714
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Yes, cPanel users can select different PHP versions for each virtual host using the MultiPHP Manager option available in cPanel:

    MultiPHP Manager for cPanel - Version 68 Documentation - cPanel Documentation

    It's only possible to use DSO as the PHP handler for a single PHP version, and we recommend only using Mod_Ruid2 with the DSO PHP handler. Thus, you could still offer multiple PHP versions, but only one with DSO/Mod_Ruid2. This document is helpful at explaining the different PHP handlers we offer:

    PHP Handlers - EasyApache 4 - cPanel Documentation

    Thank you.
     
    rhm.geerts likes this.
  12. rhm.geerts

    rhm.geerts Well-Known Member

    Joined:
    Jul 29, 2008
    Messages:
    91
    Likes Received:
    6
    Trophy Points:
    58
    Location:
    Maastricht
    cPanel Access Level:
    Root Administrator
    Ah thank you, I've read that documentation but thought it was only possible to have 1 php version running when using Mod_ruid2.
    So I understand we can run multiple php versions, but only 1 with mod_ruid2, the others for example with php-fpm (which is disabled at this moment).

    I presume php-suexec is running automatically? Because the newer v68 Cpanel does not have a "configure php and suexec" like the old 56 version has.

    I also discovered something odd. When php-fpm is not running, in the multiphp manager it is set to "on" but you can't switch it to "off" below the php version.
    If it's switch to "on" using the System PHP-FPM Status switch, then the php-fpm setting is set to "off".
    I attached a screenshot so you can see what I mean.

    Question number 3 is about the transfer tool itself. It says:
    That's a problem. The old version is 56.0.52 and the new version is 68.0.19.
    The old cannot be updated because it's the last available version on Centos 5 where that server is running on. (Yeah I know, I warned the owner about that already a couple of years ago he had to take care of moving his stuff but he wouldn't listen).

    Can I just proceed?
     

    Attached Files:

  13. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,802
    Likes Received:
    1,714
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    The suexec module is installed separately in EasyApache 4 via "WHM >> Software >> EasyApache 4". The CGI section on the following document explains how it changes the PHP script behavior:

    PHP Handlers - EasyApache 4 - cPanel Documentation

    That's by design. The option at the top of your image allows you to enable it for all accounts, while the option at the bottom of your image allows you to enable it on a per-domain basis (after selecting the domain names in the interface).

    Yes, in this case, you should proceed. Any errors will be logged during the transfer process and you can review all of the logs post-migration at "WHM >> Review Transfers and Restores".

    Thank you.
     
  14. rhm.geerts

    rhm.geerts Well-Known Member

    Joined:
    Jul 29, 2008
    Messages:
    91
    Likes Received:
    6
    Trophy Points:
    58
    Location:
    Maastricht
    cPanel Access Level:
    Root Administrator
    Great, thank you. I love the new Cpanel version and Easyapache 4. :)
     
    cPanelMichael likes this.
  15. rhm.geerts

    rhm.geerts Well-Known Member

    Joined:
    Jul 29, 2008
    Messages:
    91
    Likes Received:
    6
    Trophy Points:
    58
    Location:
    Maastricht
    cPanel Access Level:
    Root Administrator
    I'm very sorry to bump this thread, but I wanted to be very sure about something. We had to prospone the migration until now, we use another server.
    I'm not native English so I don't quite understand the mixing possibility's from the manual you referred to.

    I now installed these 2:
    PHP 5.6 with DSO and Mod_ruid2 (this is the system default for now)
    PHP 7.2 with cgi and php-fpm.

    Now the system says:
    Which is understandable.

    But on top it says:
    If I would do that, would I loose the mod_ruid2 on php 5.6? Since you stated that mod_ruid2 is only possible on a single php version.
    Or would the users get the choice between php 5.6 with mod_ruid or php 5.6 with php-fpm (for the 5.6 version)?
    That's not 100% clear to me.
     
  16. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,802
    Likes Received:
    1,714
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    PHP-FPM is enabled on a per-domain basis. Thus, you could leave DSO as the PHP handler for PHP 5.6 with Mod_Ruid2 enabled and then enable PHP-FPM for any domain names that you prefer to use it on after installing the ea-php56-php-fpm RPM. Installing the ea-php56-php-fpm RPM won't uninstall Ruid2 or the DSO handler.

    Thank you.
     
    rhm.geerts likes this.
  17. rhm.geerts

    rhm.geerts Well-Known Member

    Joined:
    Jul 29, 2008
    Messages:
    91
    Likes Received:
    6
    Trophy Points:
    58
    Location:
    Maastricht
    cPanel Access Level:
    Root Administrator
    Great, clear to me now, thanks for the quick answer!
     
    cPanelMichael likes this.
  18. rhm.geerts

    rhm.geerts Well-Known Member

    Joined:
    Jul 29, 2008
    Messages:
    91
    Likes Received:
    6
    Trophy Points:
    58
    Location:
    Maastricht
    cPanel Access Level:
    Root Administrator
    Sorry, never mind, found it. :)
     
    #18 rhm.geerts, Apr 9, 2018
    Last edited: Apr 9, 2018
Loading...

Share This Page