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 from cpanel to cpanel server with zero downtime

Discussion in 'General Discussion' started by k-planethost, Sep 19, 2011.

  1. k-planethost

    k-planethost Well-Known Member

    Joined:
    Sep 22, 2009
    Messages:
    199
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    Athens Greece
    some companies says that they can move the contents from server to server with zero downtime.
    since the dns changes can take from 3-48 hours, is this possible to happen and how?
     
  2. milind

    milind Well-Known Member

    Joined:
    Jan 15, 2006
    Messages:
    113
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Nasik (Maharashtra), India
    cPanel Access Level:
    Root Administrator
    one way to do this is by pointing A record of the domain to new server (after transfer of data) from current server and then ask your registrar to make DNS related changes with them.

    There might be other ways to do this.. and I love to see them :)
     
  3. alphawolf50

    alphawolf50 Well-Known Member

    Joined:
    Apr 28, 2011
    Messages:
    186
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    If the site is "active" at all (ecommerce, forums, etc), then no, I don't believe "zero" downtime is possible. However, an idea along the lines of what milind said would reduce the downtime to "very little":

    1. Reduce the TTL on the current domain's A record to 1/2 hr (or as short as possible).
    2. Wait the length of time of the previous TTL before continuing. This allows previously cached DNS queries to expire, and receive the new ultra-low TTL.
    3. Set up an A record for www2.yourdomain.com (or whatever) and point it to the new server's IP.
    4. Create an .htaccess rule on the old site to direct everyone to the "Maintenance" page you've designed specifically for this event. The idea is to make sure no changes can be made to the database until the site is on the new server. Make sure you return a 503 header so search engines know that this is a temporary issue, and not to index the maintenance page.
    5. Move the files and database to the new site.
    6. Change the .htaccess rule on the old server to give a 307 redirect (Temporary Redirect) to www2.yourdomain.com (or whatever). The 307 is again important because you don't want search engines to continue accessing the fake www2 subdomain once this process is finished.
    7. Update the original domain A record (www) to point to the new server's IP, and reset the TTL to a day or more.
    8. Wait a few days, check the access logs on the old server. If there are no hits, then everyone has received the new DNS records and you're free to kill the site on the old server.
    And there you have a minimum down-time site transfer. Note that if you try this with an SSL site, people's browsers will throw all sorts of security warnings due to the domain not matching the certificate. It's not really recommended in this case. It's better to have some downtime than to have people think your site is insecure because they don't understand the browser messages :)
     
Loading...

Share This Page