Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 13 of 13
  1. #1
    Member
    Join Date
    Apr 2002
    Posts
    86

    Default How To: Move sites with LEAST downtime

    Heres the idea....I've run into a few problems with overlapping and such on my server after moving and can imagine that there are hundreds of others with the same issue. Hopefully this can serve as a how-to for people searching for a solution.

    Anyway....

    In order to prevent the LEAST downtime during the transfer of a site from another server, what should you do?

    This is what I did (please correct me if I'm wrong):

    - Copied the sites (very important )
    - Set all scripts on the old server to use the new server's MySQL database to avoid data loss (be sure to setup MySQL on your new server to accept connections from a host other than localhost - done in CPanel > MySQL Database).

    What kind of solution is there for mail? Is it as simple as changing the MX records on a domain to point to the new server's IP and all mail will be routed there instead?

    Anything else anyone can think of? I might make a feature request that makes it so you can put an account in "Transfer Mode" that will automatically route all FTP, MySQL, mail, HTTP, etc. connections to the new server so there isn't a problem with lost or missing files while the DNS propogates.

    Anyway, all suggestions welcome. I know someone mentioned a How-To section on this forum so hopefully this can be the first one.

    -Troy

  2. #2
    Member
    Join Date
    Apr 2003
    Posts
    27

    Default

    I am very interested in a painless way to move sites. My problem is that I am a reseller at the moment and dont have root access on my current machine. I want to move my sites to a dedicated server but one of my clients is not really wanting to make the move. I guess he enjoys the downtime at the current location. Anyway, my client says in order for him to move it would take 10 hours of rescripting his site to accomplish this. His site is based on phpauction and has a lot of current auctions going on.


    Is there a way I can accomplish this for my clients with least amount of rescripting and downtime.

  3. #3
    Member casey's Avatar
    Join Date
    Jan 2003
    Location
    If there is trouble, it will find me
    Posts
    2,336

    Default

    Originally posted by chazzle
    I am very interested in a painless way to move sites. My problem is that I am a reseller at the moment and dont have root access on my current machine. I want to move my sites to a dedicated server but one of my clients is not really wanting to make the move. I guess he enjoys the downtime at the current location. Anyway, my client says in order for him to move it would take 10 hours of rescripting his site to accomplish this. His site is based on phpauction and has a lot of current auctions going on.


    Is there a way I can accomplish this for my clients with least amount of rescripting and downtime.
    Wow, you and I are in the same boat. However, my client that doesn't want to move has an SSL certificate that he just recently bought. I assume that he would lose it since his IP addy would have to change with the move...Oh well. I'll just have to keep my old reseller account, I guess.

  4. #4
    Member
    Join Date
    Apr 2002
    Posts
    86

    Default

    Originally posted by chazzle
    I am very interested in a painless way to move sites. My problem is that I am a reseller at the moment and dont have root access on my current machine. I want to move my sites to a dedicated server but one of my clients is not really wanting to make the move. I guess he enjoys the downtime at the current location. Anyway, my client says in order for him to move it would take 10 hours of rescripting his site to accomplish this. His site is based on phpauction and has a lot of current auctions going on.


    Is there a way I can accomplish this for my clients with least amount of rescripting and downtime.
    This is almost exactly the problem that I ran into. I have/had root on both boxes but several clients had very active websites. I tried to avoid as much weirdness as possible by copying over the site and then changing the scripts on the old server to look to the new server's MySQL database so that all updates and additions would be made to the new database. The new server was pointed to 'localhost' so there were essentially 2 servers using that 1 MySQL database. As people would begin changing from the old to the new, the data would still be the same.

    My concern is that there are many things that can relate to this such as email (what a pain!), stats, web logs, file changes, etc. About 24 hours after the move, I had a lot of complaints about missing emails. I pointed them to the old IP's webmail and they were able to read the mail that got routed there but this is very inefficient and causes a lot of problems.

    Anyway, I'm hoping somebody will post something I don't know regarding the moving that makes all the problems go away.

  5. #5
    Member
    Join Date
    Sep 2001
    Location
    Spain
    Posts
    779

    Default

    Modifying the DNS zone files to reduce the refresh times prior to switching servers can help a lot.

    http://webhostingtalk.com/showthread...threadid=57616

  6. #6
    Member
    Join Date
    Apr 2002
    Posts
    86

    Default

    Originally posted by Juanra
    Modifying the DNS zone files to reduce the refresh times prior to switching servers can help a lot.

    http://webhostingtalk.com/showthread...threadid=57616
    Very interesting read....never heard of that before.

    I'd assume that'd be the same regarding email and everything since the MX records are controlled by DNS.

    I'll have to remember that one next time I have to move.

  7. #7
    Member
    Join Date
    Dec 2001
    Posts
    33

    Default

    Several hours before you make the move, update the ttl's to 3600 or so. This will actually allow the ttl's to reset to that time period (1 hour) instead of the several hours they are currently set at (14400). Then make the move to the new server using the transfer accounts feature, return to the old server and update the dns in each field to reflect the new IPs, and viola. everything should be running on the new server within the hour. You can either point the sql database to the new server ahead of time or shut down forums for an hour to minimize any loss of info during that hour. Update your nameserver info at your registrar, give it a week to make sure you didn't miss any clients, or have any failed transfers, and if the nameservers are resolving, dump the old server and raise a glass in salute! I don't think anyone even noticed when we made the move, as several clients have asked why we haven't done it yet. They had been expecting downtime and other issues, and had none.

  8. #8
    Member rpmws's Avatar
    Join Date
    Aug 2001
    Location
    back woods of NC, USA
    Posts
    1,858

    Default

    here is what I do ..and it can take a while

    use multi-copy

    grab 5 sites at a time. watch the screen in WHM copy. Once you see a cpmove-user.tar.gz file apear in the new box home. Imideately delete that dns zone from the other server. Now create a new zone with the new IP. Follow these are they progress. On smaller sites you may grab more at a time. changing your ttl's before you do this globally could help also.

    Once you get sites moved and dns is running from old box, ..go to your registrar and change the IP's for the nameservers all you sites are using. This worked for me on 400 sites. we had no reports of lost anything. Biggest downtime for 1 site was 30 minutes. The rest were seconds to a couple of minutes. Any new traffic to the sites will find new ip right away. Some clients may wind up with stale dns at their isp but that refreshes eventually. Setting a lower ttl will help that.
    Just keeping my "eye" on things....
    R. Paul Mathews
    RPMWS - diehard cPanel Nutcase

  9. #9
    Member
    Join Date
    Feb 2003
    Posts
    24

    Default

    can someone help me in moving into a new server in details

    I did't understand the stuff written down above

  10. #10
    Member joezeppy's Avatar
    Join Date
    May 2003
    Posts
    16

    Default Why would someone have to move servers anyway?

    Hi,

    I know this might be a super newby question, but if you have a box and are using cpanel, why would you have to move servers anyway.

    Wouldn't it be better just to limit the number of domains or traffic on a server and then when you see it is getting close to whatever capacity they have, just buy a new server for expansion?

    Or is it that certain sites produce higher than expected amounts of traffic?

    Just kind of wanting to understand strategies related to server traffic and the reasons that this is important
    123DomainShop.com
    Increase your domain inventory

  11. #11
    Member rpmws's Avatar
    Join Date
    Aug 2001
    Location
    back woods of NC, USA
    Posts
    1,858

    Default Re: Why would someone have to move servers anyway?

    Originally posted by joezeppy
    Hi,

    I know this might be a super newby question, but if you have a box and are using cpanel, why would you have to move servers anyway.

    Wouldn't it be better just to limit the number of domains or traffic on a server and then when you see it is getting close to whatever capacity they have, just buy a new server for expansion?

    Or is it that certain sites produce higher than expected amounts of traffic?

    Just kind of wanting to understand strategies related to server traffic and the reasons that this is important
    reasons:

    1.) (same datacenter) would like to offer faster hardware. Servers do get faster as hardware gets better these days.
    2.) (same datacenter) possible hardware failure, like harddrives. Many times easier to move accounts to a new box for fresh installs. I have seen this done.
    3.) (same datacenter) possible that some account grew too fast and now need moving partial move.

    4.) (move datacenters) obvious reasons, price, new leased hardware ... etc.
    5.) (move datacenters) even if you could take your IPs with you ... time involved in moving machines would be downtime.

    People do this all the time to improve service. Many datacenters have gone belly up also
    Just keeping my "eye" on things....
    R. Paul Mathews
    RPMWS - diehard cPanel Nutcase

  12. #12
    Member joezeppy's Avatar
    Join Date
    May 2003
    Posts
    16

    Default Thanks rpmws...

    Those sound like valid reasons.

    I guess I'm a little sore because my old hoster, who used Cpanel moved me around a bit too much and didn't seem to care that my shopping carts and scripts, some of which required certs, were being "jacked up" on a regular basis.

    It caused me a lot of grief and is the major reason that I decided to go dedicated.

    Thanks Again.
    123DomainShop.com
    Increase your domain inventory

  13. #13
    Member joezeppy's Avatar
    Join Date
    May 2003
    Posts
    16

    Default P.S...

    Listen RPMWS,

    I'm probably pushing my luck, but you know what they say... "No good deed goes unpunished," and since you were kind enough to answer my newbie question, I wonder if I could trouble you to take a look at and comment on something that really is important for me to understand.

    My post kind of got looked over by those that know what they are doing. It's just kind of sitting there with me hoping for some answers.

    http://forums.cpanel.net/showthread....&threadid=9924

    TIA
    123DomainShop.com
    Increase your domain inventory

Similar Threads & Tags
Similar threads

  1. Best way to move sites from one cpanel to another with minial downtime
    By l00ph0le in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 01-22-2010, 08:17 AM
  2. How to move from one server to other without downtime?
    By netlook in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 06-19-2004, 09:40 AM
  3. how to move a site with min downtime?
    By neorder in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 09-09-2003, 09:32 AM
  4. Can't move sites through cpanel move.
    By DWHS.net in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 03-01-2003, 02:54 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube