Migration

This KB article will help you to migrate multiple accounts to veeble cPanel server from another cPanel server. Please go through the entire article before you proceed with the migration.

Before migration

1. Make sure you have the necessary credentials of both the servers.

This article assumes that you have the root logins of both the source and destination server.

2. Check for SSL certificates in the source server. While doing cpanel migrations, SSL might not get copied over. verify the domains which have SSL, prior to the xfer and move the accounts accordingly. Default xfers won’t copy SSL certs, they need to be selected separately.

3. Check the disk usages in the source and destination as much as you can.

4. Prior to migration, you should check both the server configuration. PHP MySQL versions should be checked as mandatory and should make the configurations as matching as possible. If PHP4 is available in source server, recompile PHP in destination to enable PHP4 as well. Also check the PHP modules and apache modules in source and destination. Check if PHP is running as DSO/suPHP on the server.

5. Randomly check some domains if they are loading correctly.

6. Reduce the TTL value to a small value such as 300 seconds in the DNS zone file for the sites in the source server. You may do this via DNS Functions -> Edit DNS Zone -> Choose a Zone to edit -> Minimum TTL.

7. On a cPanel server, the TTL value is usually set to 4 hours. So wait for 4 hours for that value to expire. After 4 hours, the new TTL value that come into effect will be 300 seconds (5 min). So, if you change the IP address of a site in that name server, the new IP address will be propagated in 5 minutes.

8. Verify Reseller packages – Some resellers start of with shared hosting accounts before migrating to a reseller account. If the reseller has not changed their hosting accounts package the accounts will continue to have the parent hosting company’s packages. Request the reseller to immediately upgrade all such packages from the hosting company’s packages to the packages created by the reseller.

9. Check for available free IP’s on the new server because for e.g. If the Old Server accounts use 6 IPS and the new server has only 4 then transfers will begin to fail once all the IP’s are used up. If Additional IP’s are required, order the IP’s and wait till they are added.

10. Backup these files on both servers:

/usr/local/apache/conf/httpd.conf.
/usr/local/Jakarta/tomcat/conf/server.xml
/etc/named.conf

11. Enable the below setting within Tweak Settings on the new server.

Server Configuration -> Tweak Settings -> When adding a new domain, if the domain is already registered, ignore the configured nameservers, and set the NS line to the authoritative (registered) ones.

(IMP: Remember to uncheck this feature after the transfer process is over)

Recommendations

1. Perform the migration at non-peak hours i.e at a time when the traffic to the server is less.

2. Disable all forums, blogs(if any) prior to migration. We recommend this to avoid data loss due to migration.

3. If you do not have previous experiences with control panel, we recommend you to be cautious while performing the migration. DO NOT DELETE ANYTHING FROM THE SOURCE SERVER.

Migrate domains

I would recommend you to follow ‘Method I’ for accounts with size less than 2GB and ‘Method II’ for those greater than 2GB.

Method I – The simplest one, via WHM.

1. Login to the WHM of the destination server.

2. Go to WHM >> Transfers >> Copy multiple accounts/packages from another server.

3. This documentation will help you to proceed through the migration.

4. Click on Copy.

WHM will start migration of the accounts from the old server to the new server and the time taken for this process depends upon the size of the data being transferred.

TIP: You can also select multiple reseller packages and accounts but for large reseller accounts with more than 5 GB of data, it is strongly recommended that you transfer 1 reseller’s account at a time.

5. Upon successful completion a log report is displayed.

TIP: Please do not press the BACK button during any stage of the transfer process.

Method II – When you have root SSH access to both the servers.

1. Log in to the source server.

2. Create a backup of the account.

/scripts/pkgacct acccountname

If the home directory of the account is too large, you may use the switch –skiphomedir also.

/scripts/pkgacct --skiphomedir acccountname

3. Send the created package to the destination server.

scp -P 2200 /home/cpmove-accountname.tar.gz root@destinationip:/home/

Here the ssh port of the destination server is assumed to be 2200.

4. Restore package in the destination server.

/scripts/restorepkg --force  cpmove-accountname.tar.gz

5. If you have skipped the home directory, sync the home directory in the source and destination server. Run the following command from the destination server.

rsync -avz -e "ssh -p 2200" /home/accountname/* root@sourceserveripaddress:/home/accountname/

Method III – One by one…

This method is useful when you have only the cPanel access of the account(s) in the source server and root access in the destination server. The method is not expected to be 100% successful when the account size is larger than 3-4 GB.

1. Create a temporary FTP account on the destination VPS, following commands can be used to do so:

useradd tmpupl 
passwd tmpupl 
/scripts/ftpupdate 

2. Login to reseller WHM and access the Cpanel of the account which is going to transfer.

Go to “WHM >> Account Information >> List Accounts” and click on the Cpanel icon near the domain name for accessing the Cpanel of that domain.

3. In the Cpanel of the account go to backup option.

4. Go to Backups – > Generate/Download full account backup, select FTP server as storage location, type VPS IP as server name, “tmpupl” as remote username and password that was set for the tmpupl account, click create backup

Sample settings :

Backup Destination : Remote FTP server Email Address : mailid Remote Server (FTP/SCP only) : IP of the VPS Remote User (FTP/SCP only) : tmpupl Remote Password (FTP/SCP only): tmpupl or the password that you had set using passwd command.

You will receive a mail when the backup id completed.

5. Once backup uploaded to the VPS move it from /home/tmpupl to /home directory.

6. restore it either through WHM or using the /scripts/restorepkg command.

/scripts/restorepkg --force  cpmove-accountname.tar.gz

7. After all accounts are copied over/restored :

– kill temp FTP account:

userdel -r tmpupl 

– remote /home/cprestore directory:

rm -rf /home/cprestore 

This is what we usually do when it comes to migrations from reseller systems this is working in 99.99% of cases.

After Migration

1. Restart Bind and Apache through WHM on the new server. Restart Services ->

DNS Server (BIND/NSD) HTTP Server (Apache)

2. You can check whether the migration is successful via the temporary URL :http://ipaddress/~accountname .

Please note that the temporary link should work as long as you don’t use mod_rewrite functionality [as in wordpress sites] which won’t work through mod_userdir or if you don’t have any domain-based redirects. This is the reason for the internal URL’s to cause the 404 error. Please edit the local hosts file on your local computer to override DNS configuration just for you so you can visit your site on your server. Location of the hosts file depends on the operating system you have installed on your local computer. Please give the below entry in your hosts file and verify the site.

ipaddress domain.com www.domain.com  

eg:- 123.45.67.89 example.com www.example.com

This link will help you to find the location of the hosts file in your local machine.

3. Check whether the domains have been transferred.

You can compare/crosscheck the file /etc/userdomains and the home directory size of the accounts in both the servers.

du -sch /home/*
or
du -sch /home/username

4. If you see that the size of the home directory of an account in the destination server is less than that in the source server, sync the home directory.

5. Make a list of all accounts that use dedicated IP’s in the source server and verify that they have been allotted an IP after the transfer process is over.

6. Check the domains with SSL certificate installed. You may need to re-install them after migration.

7. Change the A record for the domains in your source server to the veeble (destination server’s) IP address.

8. At the registrar’s end, change the nameservers of the domains to the nameservers of the veeble (destination) VPS. Normally the DNS propagation time may take 24 to 48 hours to be in effect.

9. If any reseller account is using private Nameservers, you will have to edit the DNS Zone for the domain on the new server, as the nameservers will be pointing to the old IPS. Modify the nameserver IP’S of the reseller account to the new server’s nameserver IP’s.

DNS Functions -> Edit DNS Zone -> Choose a Zone to edit ->

10. If the MX record of a domain has been set to point to the hostname of the old server, then the MX record also has to be changed to point to the hostname of the new server when you edit the DNZ Zone.

e.g MX record hostname -> old.olddomain.com. has to be changed to new.newdomain.com. If the MX record pointer points to the domain name then this change is not required.

11. If any account had servlets installed on the old server, you will have to reinstall the servlets for that account on the new server.

12. Dedicated IP’s are automatically assigned if they are ‘checked’ during the transfer process. However, if you have to assign a new IP to an account on the new server that has been migrated from the old server but did not have a dedicated IP on the old server, please wait for 24 hours after migration so as not to overlap the DNS migration and IP change process.

13. Use intodns.com, dnsstuff.com or a similar website to check that all the main reseller domains have been updated and that there are no DNS errors reported for any domain.

Emails start to work on the new server quickly and you can check your email logs to verify if migrated domains are receiving their emails on the new server.

TIP: Initially check this for domains that report high volume of email traffic.

You need root SSH access.

cd /var/log 
grep domain exim_mainlog

14. After all reseller accounts have been copied: On New Server: Uncheck the below setting.

Server Configuration -> Tweak Settings -> When adding a new domain, if the domain is already registered, ignore the configured nameservers, and set the NS line to the authoritative (registered) ones.

With Veeble, migration service is completely free.