Dedicated Server Hosting : Migrations

Moving your Dedicated Server Hosting data is not difficult if you plan accordingly.

A complete migration of a website involves transferring the website data itself,it means all the HTML and possibly PHP and MySQL files and CGI programs. For this you will also need to modify the DNS (Domain Name System)information for the website and for the routing of the website email. DNS (Domain Name System) keeps the information that translates IP addresses to human-readable domain names. For any Website migration, the two important DNS records are the address (A) record, which says the browser the IP address of the Web server, and the mail exchange (MX) record, which guides mail servers how to route the email.

When you wants to migrate your Web site to another Dedicated Server hosting provider, you will need to update DNS to point browsers to the new location of your website. However, it can take as long as 12-48 hours for DNS updates to propagate to all DNS servers on the web.

Many times your domain name has been registered through a 3rd party domain name registration company. When you move the website, your domain name and company remains the same, and only your Webhosting company changes. If your domain name originaly came with hosting, you may need to contact your old hosting company to see if you can separate the hosting package from the domain name.

The keys to a successful migration are preparation and planning. Before moving you should inform your users or customers of the forthcoming upgrade. Prepare a “server down for upgrade” page for your old website. Please note the IP addresses of your new and old servers; these will come in handy when DNS is still in flux.

First decide the time when you wants to upgrade, meaning when your server is least busy. If you have website statistics, use those to determine the best time. To reduce down time, it is best to make the DNS changes several hours before you actually move the domain. As long as your mail server is running on the new server, you will not lose any email messages. If you have a static website, you can copy over the data before you switch DNS and no one will ever know your hosting provider changed.

The DNS changes you will need to make involves updating the MX and A records to point to your new server. For that, you will need to access the control panel provided by the domain name registration company from which you obtained your domain name. new MX record will need to point to the new server. For example A records, MX records can take some while to propagate through the Internet. To avoid mail loss you will need to check your old mailbox at least once a couple of days after the move. You will also need to use the IP address of the old mail server rather than its domain name, as you won’t be able to rely on mail.domain.com to check the old mailbox, as that will point to your new server. Depending on how much control you have of your old server, you could shut down the mail server after modifying the MX records, in which case incoming mail would queue up until the new mail server is running, at which point it would be delivered without problems.

How to move a website files?

Once you have changed the DNS information, after that it’s time to tackle the data itself. HTML and PHP files are not hard to move; just use a good FTP program and copy the data from one server to the other. If you have SSH access to both of the servers you can copy the files directly. If you don’t, you will have to download the files to a local machine and then upload them to the new server.

How to move Database from one dedicated server to the another?

1)Moving databases is a bit difficult. For example if you are using MySQL, there are many ways to copy over the data. One is to do a dump of the data into a file and then copy that file to the new server and populate the new database. To do this you use the mysqldump command:

$ mysqldump -p -u username mydatabase > mydata.sql

Once copied onto the new server your can populate your new database with the mysql command:

$ mysql -p -u username mydatabase < mydata.sql

2) If you do not have SSH access to your server hosting package then you would not be able to use these MySQL commands, but you can still use a tool such as phpMyAdmin which handles MySQL administration over the Web. phpMyAdmin has excellent dump and restore features, though for the restore there is a maximum upload file size of 2,048KB. You can use compression to maximize your chances of squeezing all of your data into 2MB.

3) If you lack SSH access and you have too much data for phpMyAdmin to handle, look into a MySQL synchronization tool called SQLyog Job Agent (SJA).

4) If all of the above fails you will need to ask the support team of your old hosting company to dump your database for you. Then you will need to ask the support team of your new hosting company to populate the new database.

If you have a website with dynamic data, such as an e-commerce website, you will need to make special provisions for the DNS update delays. As the DNS changes propagate through the Internet some people will see your new website and others your old. This could cause problems for you. Imagine if a customer placing an order on your old website after you have moved all the data over to your new website.

You can deal with this problem by 2 different ways.

First, stop taking orders from the old website once you have started the move. At the checkout stage display a polite notice asking customers to come back in a couple of hours, after which they should be taken to the new website. If you don’t have that kind of control over your website then the best thing is to close down the old website by replacing its index.html with a notice saying the server is down for upgrades and will be back soon. An alternative solution is to use a synchronization tool like SJA to make sure any changes made on the old website get propagated to the new one.

Finally, watch out for incompatibilities between the software on your old server and that on the new. Try to make sure that any difference in versions of crucial software like MySQL and PHP won’t cause any problems.

Tags:

Leave a Reply