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.

How to Move a cpanel/WHM Server?

Discussion in 'General Discussion' started by bidware, Aug 11, 2006.

  1. bidware

    bidware Active Member

    Joined:
    Sep 2, 2005
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Is there a program available (or set of commands) that would allow me to move my entire server to another cpanel / WHM server? I've done customization and there are certain configuration settings that I don't want to have to remember to setup on the new server, etc. So, there must be a program to move the server, say via ftp or something similar?

    Thank you.
     
    #1 bidware, Aug 11, 2006
    Last edited: Aug 11, 2006
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    The script posted by DigitalN pretty much does it if you don't want to go down the backup/restore route:
    http://forums.cpanel.net/showthread.php?t=35046

    You'll have to use the WHM IP Migration wizard afterwards if your IPs are changing.
     
  3. bidware

    bidware Active Member

    Joined:
    Sep 2, 2005
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Ok. That script should work with moving the server. But, there might be one more problem to consider. Once you move the files to the new server, then set the DNS servers (ns1, ns2) to the new IP's of the new server, there will be a 12 to 72 hour period that the DNS takes to propagate. So, during that time, the old server will still be receiving the updates for the 12 to 72 hour period. So, when the DNS finally resolves to the New Server, the New server will not have the current version of the files. Is there any way to ensure that the New server is actually up to date when the DNS does resolve?

    Thanks.
     
  4. rsaylor

    rsaylor Well-Known Member

    Joined:
    Mar 27, 2003
    Messages:
    160
    Likes Received:
    1
    Trophy Points:
    18
    The answer is to update the zone files on the old server after the account have been moved.

    Do a search on perl -pi

    This is a search and replace, old IP to new IP
     
  5. bidware

    bidware Active Member

    Joined:
    Sep 2, 2005
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Thanks for that. So, you would run perl -pi on the new server, right after accounts have been moved and ns1, ns2 have been changed?
     
  6. bidware

    bidware Active Member

    Joined:
    Sep 2, 2005
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Would you just do the search and replace on the New server or the Old server? I wasn't sure about that.

    Thanks
     
  7. rsaylor

    rsaylor Well-Known Member

    Joined:
    Mar 27, 2003
    Messages:
    160
    Likes Received:
    1
    Trophy Points:
    18
    you would run the pearl -pi on the old server so basically you are changing the old ip to the new ip in every zone file. Then restart named. All sites are instrantly resolving to the new server. Now, people who recently visited the sites would have to flush there DNS before it updates for them.
     
  8. bidware

    bidware Active Member

    Joined:
    Sep 2, 2005
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Thanks for that. On the new server, would I still have to run the wizard that appears when you login to whm for the first time?
     
  9. bidware

    bidware Active Member

    Joined:
    Sep 2, 2005
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    So how would the users Flush their DNS? They wouldn't necessarily know what that means.
     
  10. nickp666

    nickp666 Well-Known Member

    Joined:
    Jan 28, 2005
    Messages:
    770
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    /dev/null
    FOR WINDOWS:

    ipconfig /flushdns

    from the command prompt if they arent using an internal DNS server (sometimes needs a few goes to work)

    If they are running windows server with DNS, go into administrative tools > dns, right click on the server name and choose 'Clear Cache' then run the above a couple of times on the server as well
     
  11. bidware

    bidware Active Member

    Joined:
    Sep 2, 2005
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Ok. Would the script mentioned also transfer all installed programs (for example zend optimizer, current PHP settings, etc. etc.)?

    Thanks.
     
  12. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    No it doesn't. You have to redo that sort of thing manually.
     
  13. bidware

    bidware Active Member

    Joined:
    Sep 2, 2005
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Ok. Thanks. Does that script also change the IP's for all the files copied over to the New server's IP's? I was thinking that cpanel's copy accounts function would be easier to use. Then after copying accounts, configure PHP, and install zend, etc. That would still work the same, or is there still more that I'm missing?
     
  14. bidware

    bidware Active Member

    Joined:
    Sep 2, 2005
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Also, in WHM, can you view the current PHP settings somewhere? I noticed that in Apache Update, It simply shows the default settings, and not necessarily the current ones.
     
  15. nettigritty

    nettigritty Well-Known Member
    PartnerNOC

    Joined:
    Jan 21, 2004
    Messages:
    194
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Bangalore, India
    click load previous config in the apache build page to see that or use phpinfo();
     
  16. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You can actually copy them over with the file in /etc/buildapache/config.pl

    The script doesn't change the IP's, you'd need to use the WHM > IP Migration Wizard for that.
     
Loading...

Share This Page