05 décembre 2012

Server Migration: cPanel to cPanel Server Migration

How to Migrate cPanel server:


This article will guide you if you are migrating your cPanel server to an another cPanel server. Before migration your server, please read the section “Server Migrations” carefully.

You can chose a suitable time frame for migration. When you have minimum hits say at mid night, start the process and finish it asap and change the DNS. This will keep the Forums/ MySQL databases pretty much updated.
The first thing you have to do is, setup the new server, install cPanel, and setup the accounts with exact usernames as you had in old server.

Setup the new server:

- Install latest version of cPanel, run easyapache and install all php version, modules by comparing with old server

- No need to install any additional softwares, unless needed by customer. If any plugins were installed in old server, install the same in new server too.

- Compare PHP Configuration before migration:

Be sure to compare apache and php versions on both servers.
Also install all PHP, apache modules to make the configurations similar to source server (run easyapache).

- Compare Perl Configuration before migration:

Compare perl versions on source and destination server
Install perl modules (You can use instmodsh command to list perl modules on source server)

Steps to Migrate cPanel Server:

1) Three days before the transfer, Edit a DNS records and set the main TTL to 600. Also make the clients aware of the move atleast 1 week before the transfer.


2) Login to the destination server WHM and go to:

Main > cPanel Migration Manager


3) Enter the details of the source server there and the destination server will fetch a list of accounts on destination server. Check the boxes for accounts which are to be copied.


4) Begin migration and wait for it to finish.


5) Test your applications/websites: Once the migration is finished, you can proceed with testing before you make changes in DNS settings of websites. Since the website is still pointing to the old server, its not possible to test the wesite directly. The workaround is given below.

How to test websites after migration when DNS entry is still pointing to old server:


There is a file “hosts” in all computers that let you change the IP addresses of any websites locally. You can add the following entry in that file to change the IP address of your websites to new server’s IP:

IP_Here website.com

Location of “hosts” file in Windows XP, Windows 7 and Linux:


Windows XP and Windows7: $Windows-home/System32/drivers/etc/hosts. If you’re using Windows 7, you cannot edit this file unless you have administrative privileges.
To edit hosts file in Windows 7, click Start > Right click on notepad and chose “run as administrator” > Open > $Windows-home/System32/drivers/etc/hosts

Linux: /etc/hosts. Open a command prompt and run “sudo vi /etc/hosts” to edit the file.


6) Change DNS: Once you finished testing, go ahead and change the DNS. If you changed your TTL value before 2 – 3 days, the DNS will be propagated in 10 minutes throughout the internet.



Some problems you may face in cpanel migrations:



Problem while migrating ssl sites cPanel:


If the account being fetched have a dedicated IP address on source server, the migration manager will detect this and try to assign a dedicated IP address for that account on destination server. If there are no IP addresses left on destination server, migration will fail.

Also if you have configured IP addresses not from cPanel, the cPanel may not be able to detect the IP address and give you error when migrating ssl sites.

Work Around:
Note down domains having dedicated IP address before migration.
Uncheck the box “Dedicated IP” for these domain and perform migration
Once the data transfer is complete, assign a dedicated IP for the domains in question from WHM > Change site’s IP address

Problem with existing accounts:

If the same username/account exists on destination server, Migration will fail


Work Around:
Remove the account from dest server and run the migration again

1 commentaire :