Thursday, October 8, 2009

How To Move To Another Server or Datacenter

Written By Robert Bohm

So it's time to transfer your clients to a new datacenter? Want to minimize downtime, bounced emails, and dynamic data loss?
 Here is a handy walk-through for you if you are using WHM/CPanel, although the principles are the same and can be adapted for any control panel or none at all! Remember, this requires that you have root, or know your clients logins and passwords.

Several hours before you will be doing the actual site transfers, you will need to do the following for each account:

1. Login to your current WHM account. Under DNS Functions, choose "Edit a DNS Zone" Choose the account you want to prepare for transferring.

2. In the zone file you will see @ IN 14400 SOA, change the 14400 to 3600. The 14400 represents 4 hrs and we want to shorten this period to an hour.

3. Approximately ½ way down the page you will see a section called "Records" with several entries under the TTL (Time To Live) heading that have 14400 in them; you will need to change these to 3600 as well.

4. Update the serial number by one to show this is the newest update, save it, and repeat for each site.

Once you have done this for every account you want to transfer, go get some coffee or caffeinated beverage and take a break….. if you have a lot of clients, you are in for a long stretch!

Ready? Ok, login to your new WHM server and go the section titled "Transfers". Under this heading will be several options, but we will only worry about the first 3.

The first option is available if you have root access on the original server and only need to copy one account, or only wish to copy one account at a time.* (this may be a wise decision if you have a limited number of clients, more on this later).

The second option is available if you do not have root on the original box, but you do know your clients password.

The third option is if you do have root on the original server and want to copy all your accounts over at once.

1. Determine whether the sites you are transferring is static or dynamic. Static meaning mainly html with no actively used database, and dynamic meaning an in use forum type of database. If it is a static site, you are ready to transfer, if it is a dynamic site, you will need to shut down the database for an hour until the site is redirected from the old server.

2. Choose the option you wish to use to transfer the account(s)

3. You will now need to fill in the original servers IP, username and password. You will also need to choose whether to give the site an IP on the new server, and what type of server you are transferring from. Click setup.

4. Your new server will attempt to login via ftp and package the account up with databases, and email accounts/passwords intact. It will then transfer and setup the account on the new server, and if all is correct, you will receive a message stating the transfer was successful.

5. Under DNS Functions, choose "Edit a DNS Zone" Choose the account you want to edit, (the one you just transferred) and change the nameservers information to reflect your nameservers, instead of the default nameserver values of the server, increase the serial number by one, save, and repeat for each account.

6. Now log back into your old server, and in the "Records" section again, change
all instances of the original IP to the new IP on the new server. Increase the serial number by one, save and close.

7. Repeat steps 1 – 6 for each account.

In about an hour, once the TTL cycles, the sites will be resolving on the new server……only one more step to do. Go to your registrar and update the IPs of your nameservers to reflect your new IPs. That's it! It wasn't that hard, was it? Your clients would probably have never known you switched datacenters/servers if you wouldn't have told them…you did tell them, didn't you? You have minimized downtime (hopefully none), transferred them seamlessly, and have the sites live on the new server BEFORE the nameserver propagation has even went thru!

* Large sites/databases do not always transfer correctly, as well as multiple accounts transferring at once having had problems. Transferring accounts one by one, although a long, time consuming process, seems to avoid these issues.

One other thing you will need to check on the new server, is that the control panel skin you were using on the old server is actually available on the new server, or the /cpanel will not display. You will then need to choose a new skin for each account.

No comments:

Post a Comment