The following warnings occurred:
Warning [2] "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? - Line: 613 - File: inc/plugins/myadvertisements.php PHP 7.3.33 (Linux)
File Line Function
/inc/class_plugins.php 38 errorHandler->error
/inc/class_plugins.php 38 require_once
/inc/init.php 239 pluginSystem->load
/global.php 20 require_once
/wiki.php 4 require_once
Warning [2] "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? - Line: 654 - File: inc/plugins/myadvertisements.php PHP 7.3.33 (Linux)
File Line Function
/inc/class_plugins.php 38 errorHandler->error
/inc/class_plugins.php 38 require_once
/inc/init.php 239 pluginSystem->load
/global.php 20 require_once
/wiki.php 4 require_once
Warning [2] "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? - Line: 701 - File: inc/plugins/myadvertisements.php PHP 7.3.33 (Linux)
File Line Function
/inc/class_plugins.php 38 errorHandler->error
/inc/class_plugins.php 38 require_once
/inc/init.php 239 pluginSystem->load
/global.php 20 require_once
/wiki.php 4 require_once
Warning [2] "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? - Line: 749 - File: inc/plugins/myadvertisements.php PHP 7.3.33 (Linux)
File Line Function
/inc/class_plugins.php 38 errorHandler->error
/inc/class_plugins.php 38 require_once
/inc/init.php 239 pluginSystem->load
/global.php 20 require_once
/wiki.php 4 require_once
Warning [2] "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? - Line: 801 - File: inc/plugins/myadvertisements.php PHP 7.3.33 (Linux)
File Line Function
/inc/class_plugins.php 38 errorHandler->error
/inc/class_plugins.php 38 require_once
/inc/init.php 239 pluginSystem->load
/global.php 20 require_once
/wiki.php 4 require_once




Perfect Cpanel - Cpanel Migration steps
Original Current
Migrations are always a head ache for customers and end-users. Main Reason for this is doing migrations without proper planning. If we plan a migration then yes we can try to reduce the downtime of the sites to the least say 2 – 3 min. I agree that we might have to do migrations in a hurry like the old server is down due to hardware issues or some other bad disk issues. If the migration is not properly done and sites are live then there are chances to get the sites getting updated in the old server and after dns propagations clients will start crying saying the data is missing. As a server admin I have seen this many times due to non-planning and customers always come in a hurry to us just before old server cancellation. Main point is to Plan Migrations as early as possible and discusses the same with your Server Administrator. Here I will be discussing a cPanel - cPanel Migrations Steps which is using DNS (nameservers) pointed to the same server which is having data and also will mention how we can do if you have nameserver cluster setup. So steps will be divided into 2 criteria 1. cPanel – cPanel migration whose nameservers are using same server’s DNS installation and not having any cPanel dns only or DNS cluster setup. 2. cPanel - cPanel Migration Having DNS Cluster setup and not using server’s DNS installation I am writing this Doc when the cPanel is at Version 11.58.x and discussing the first option which is the normal case. Migrations Steps whose nameservers are using same server’s DNS installation 1. We should start preparing for migration at least 24 – 48 hours prior to actual data migration. We should check all the domains in the old server and reduce ttl value atleast 24 hours before for all domains. If any domains is using external nameservers, then inform the client about the same and get it done in their remote nameserver section. Reducing TTL value will help to reduce the time of propagation and You can google more about the same if you wish to get exactly how this will help you during migration. To reduce the TTL value please use the below steps # cd /var/named # replace 14400 300 -- *.db # replace 86400 300 -- *.db Please change the values 14400 and 84400 values as per the old server in your case. To make those changes alive, we might need to restart dns service. /scripts/restartsrv named If you are using a DNS Cluster, or using cPanel dns only servers, then please proceed the same above steps in those servers and make sure the ttl of the domains has been changed to 300 seconds which is 5 min. If you are migrating the ip’s then you can ignore this steps as there might be now use in this but I will always suggest to this done as it will help us to revert any changes if anything happens and you have to revert all back to old server. 2. Order the New server with similar partition structure as per the old server or just get a server with all space on a single / partition. If you are planning to use SSD Drive for MySQL, then Please mount either /var/lib/mysql as a separate partition. 3. Install cPanel in the new server 4. Setup the New server as per the old server Main things which a client want to get migrated will be the below ones and some might want to replicate custom setups, Binary Installations, Additional settings outside the cPanel. It is always good to ask the customer whether he has any custom settings in the old server like some custom / shared file path for his sites, custom binary installations etc. a. Apache and Php modules You can copy the Apache and php Modules using the below steps. If you have any profile saved and that is in use, then you can copy that profile from /var/cpanel/easy/apache/profile/custom/custom.yaml ( the name custom.yaml will be the name you gave while saving the profile). If you do not have any profile saved, then better use the /var/cpanel/easy/apache/profile/ _last_success.yaml First Sync the below folders and files and then do an easyapache /var/cpanel/easy/apache/custom_opt_mods/ /var/cpanel/easy/apache/prefs.yaml /var/cpanel/easy/apache/profile/ /var/cpanel/easy/apache/rawenv/ /var/cpanel/easy/apache/rawopts/ /var/cpanel/easy/apache/state.yaml # /scripts/easyapache Or If you just need Apache/php modules from the last run easy apache, then simply copy /var/cpanel/easy/apache/profile/ _last_success.yaml file from old server to new server’s /var/cpanel/easy/apache/profile/custom folder and rename the file name from _last_success.yaml to mycustom.yaml. After renaming the file, Run easy apache using the below command # /scripts/easyapache --build --profile=mycustom After completion, please compare the modules and php handler using the below commands and make sure all are migrated properly. # php –m # /usr/local/cpanel/bin/rebuild_phpconf --current b. Php.ini values (Server wide ones) If both old and new server have same version of php, then you can copy the /usr/local/lib/php.ini from old server to new server c. Mail Server settings You can take Exim Backups from old server from Home »Service Configuration »Exim Configuration Manager »Backup Tab and click “Run Backup”. Once the backups is saved in localmachine, Login to new server and go to Home »Service Configuration »Exim Configuration Manager » Restore tab and upload the backup you downloaded from old server and Click “Restore Backup”. d. MySQL Settings If the mysql versions are same you can just copy the /etc/my.cnf file from old server to new server and if mysql versions are different , then please try to use values from old server only if needed e. Mod security settings and copy custom rules Check if the old server is using any Modsec rules like Atomiccorp, Comodo or OWSAP etc and migrate all those rules and confirm all are migrated as well. Also check if any vendor installation is there in old server and copy the same vendors first and then see if there is any custom rules added. f. cPanel Tweak Settings /var/cpanel/cpanel.config contains the settings that are displayed in the interface in Tweak Settings. Copy this file to new server and replace the existing one if cPanel versions are same for both old and new server. If versions are different, just check the files differences using diff command and manually add those changes which are needed for new server. Once you made necessary changes or replace the file, then you need to restart cpanel using “/usr/local/cpanel/scripts/restartsrv_cpsrvd'” or “service cpanel restart” to fully update your server's configuration. g. Install the needed plugins after consulting with the server owner and get them licensed and installed. h. Install Firewall ( I will mention CSF here ) in the new server and copy the csf.conf , csf.allow, csf.pignore, csf.ignore, csf.deny files etc and restart firewall i. Install SSL certificate for the services like cpanel/whm/webmail/exim/ftp etc and if old cert is having good amount of validity left, then ask the client to use the old cert and change hostname to match the old one or whether he will get new cert for the new hostname. j. Other Hardening Steps done in old server and add more if there is anything which the current admin can do 5. Once you are sure the new server is setup almost similar / same as that of the old server and expect no issues after migration ask the customer for an off peak hours and get the initial Migration scheduled and perform an initial migration using cPanel Transfer tool. During cPanel migration using transfer tool, Please check the Size of the accounts in the old server and do full transfer only for those accounts whose size in less and those who is having say more than 3 GB, better method to do those migrations will be make a list of those accounts, Do a Skip home migration while initial transfer and sync the home directories of those accounts using rsync command. A good system admin might be able to write a script to get these done automatically as it needs ssh trust added for password less execution of commands, some basic scripting for syncing files and databases. 6. Once the Initial Migration process is completed ( account copy using transfer tool and sync of those account which you used skip home via transfer tool and data sync of those users using rsync command),Please ask the customer to check the sites using offline method. You can create the hosts file entry using the below command in the new server . # grep -v nobody /etc/userdomains | awk -F\: '{print $1}' | sed -r 's/(.*)/202.60.64.189 \1 www.\1/g' Some times you might need to educate the customer to how to do this check from his local PC. 7. When customer checks the sites and finds and issue , Please make sure to fix those server wide and ask customer to keep a track of changes he made related to site level or file level so that he can do those fixed after Final Sync of files and DB 8. Once this check step is completed by customer, ask him the time to do the Final Migration and then get it scheduled. 9. Prepare any Scripts needed or any changes needed to be made in the scripts made earlier for syncing. Please try to start the home sync first and db sync to be done just before dns change. So plan accordingly. You can do an additional home sync as well when you try restoring the db as well for extra secure for mails. 10. Once Final sync is completed, you can change the sites ip’s to new server using replace command in the old server # cd /var/named # replace 191.168.1.10 192.140.1.11 -- *.db # replace 191.168.1.200 192.140.1.12 -- *.db Replace the ip’s with correct one according to your old and new servers and restart named after these changes. 11. Login to the nameserver domain’s registrar control panel and change the ip’s of the nameservers to the new ones. 12. Check if all is fine from new server and make sure all is loading from new server. 13. If all is fine , then stop all the services from old server other than SSH and DNS and stop them in chkservd as well. 14. Ask the customer to keep this server for a few days so that you can sync any data if customer complains any thing missing. Also ask the customer to better to have a total server backup so that he can retrieve any thing if needed in future. 15. Change the IP / Hostname in the Nagios / Services / etc in your company if you are a server management company. I hope these steps will be fine for a normal cPanel – Cpanel server migration. Please email if you have any questions or suggestions to make on this doc so that I can make this better

Perfect Cpanel - Cpanel Migration steps

 

Migrations are always a head ache for customers and end-users. Main Reason for this is doing migrations without proper planning. If we plan a migration then yes we can try to reduce the downtime of the sites to the least say 2 – 3 min. I agree that we might have to do migrations in a hurry like the old server is down due to hardware issues or some other bad disk issues. If the migration is not properly done and sites are live then there are chances to get the sites getting updated in the old server and after dns propagations clients will start crying saying the data is missing. As a server admin I have seen this many times due to non-planning and customers always come in a hurry to us just before old server cancellation.

Main point is to Plan Migrations as early as possible and discusses the same with your Server Administrator.

Here I will be discussing a cPanel - cPanel Migrations Steps which is using DNS (nameservers) pointed to the same server which is having data and also will mention how we can do if you have nameserver cluster setup. So steps will be divided into 2 criteria

1. cPanel – cPanel migration whose nameservers are using same server’s DNS installation and not having any cPanel dns only or DNS cluster setup.
2. cPanel - cPanel Migration Having DNS Cluster setup and not using server’s DNS installation

I am writing this Doc when the cPanel is at Version 11.58.x and discussing the first option which is the normal case.

Migrations Steps whose nameservers are using same server’s DNS installation

1. We should start preparing for migration at least 24 – 48 hours prior to actual data migration. We should check all the domains in the old server and reduce ttl value atleast 24 hours before for all domains. If any domains is using external nameservers, then inform the client about the same and get it done in their remote nameserver section. Reducing TTL value will help to reduce the time of propagation and You can google more about the same if you wish to get exactly how this will help you during migration.


To reduce the TTL value please use the below steps

# cd /var/named
# replace 14400 300 -- *.db
# replace 86400 300 -- *.db

Please change the values 14400 and 84400 values as per the old server in your case.

To make those changes alive, we might need to restart dns service.

/scripts/restartsrv named

If you are using a DNS Cluster, or using cPanel dns only servers, then please proceed the same above steps in those servers and make sure the ttl of the domains has been changed to 300 seconds which is 5 min.

If you are migrating the ip’s then you can ignore this steps as there might be now use in this but I will always suggest to this done as it will help us to revert any changes if anything happens and you have to revert all back to old server.

2. Order the New server with similar partition structure as per the old server or just get a server with all space on a single / partition. If you are planning to use SSD Drive for MySQL, then Please mount either /var/lib/mysql as a separate partition.

3. Install cPanel in the new server

4. Setup the New server as per the old server

Main things which a client want to get migrated will be the below ones and some might want to replicate custom setups, Binary Installations, Additional settings outside the cPanel. It is always good to ask the customer whether he has any custom settings in the old server like some custom / shared file path for his sites, custom binary installations etc.

a. Apache and Php modules
You can copy the Apache and php Modules using the below steps. If you have any profile saved and that is in use, then you can copy that profile from /var/cpanel/easy/apache/profile/custom/custom.yaml ( the name custom.yaml will be the name you gave while saving the profile). If you do not have any profile saved, then better use the /var/cpanel/easy/apache/profile/ _last_success.yaml

First Sync the below folders and files and then do an easyapache

/var/cpanel/easy/apache/custom_opt_mods/
/var/cpanel/easy/apache/prefs.yaml
/var/cpanel/easy/apache/profile/
/var/cpanel/easy/apache/rawenv/
/var/cpanel/easy/apache/rawopts/
/var/cpanel/easy/apache/state.yaml

# /scripts/easyapache

Or If you just need Apache/php modules from the last run easy apache, then simply copy /var/cpanel/easy/apache/profile/ _last_success.yaml file from old server to new server’s /var/cpanel/easy/apache/profile/custom folder and rename the file name from _last_success.yaml to mycustom.yaml.

After renaming the file, Run easy apache using the below command

# /scripts/easyapache --build --profile=mycustom

After completion, please compare the modules and php handler using the below commands and make sure all are migrated properly.

# php –m

# /usr/local/cpanel/bin/rebuild_phpconf --current

b. Php.ini values (Server wide ones)

If both old and new server have same version of php, then you can copy the /usr/local/lib/php.ini from old server to new server

c. Mail Server settings

You can take Exim Backups from old server from Home »Service Configuration »Exim Configuration Manager »Backup Tab and click “Run Backup”. Once the backups is saved in localmachine, Login to new server and go to Home »Service Configuration »Exim Configuration Manager » Restore tab and upload the backup you downloaded from old server and Click “Restore Backup”.

d. MySQL Settings

If the mysql versions are same you can just copy the /etc/my.cnf file from old server to new server and if mysql versions are different , then please try to use values from old server only if needed

e. Mod security settings and copy custom rules

Check if the old server is using any Modsec rules like Atomiccorp, Comodo or OWSAP etc and migrate all those rules and confirm all are migrated as well. Also check if any vendor installation is there in old server and copy the same vendors first and then see if there is any custom rules added.

f. cPanel Tweak Settings

/var/cpanel/cpanel.config contains the settings that are displayed in the interface in Tweak Settings. Copy this file to new server and replace the existing one if cPanel versions are same for both old and new server. If versions are different, just check the files differences using diff command and manually add those changes which are needed for new server. Once you made necessary changes or replace the file, then you need to restart cpanel using “/usr/local/cpanel/scripts/restartsrv_cpsrvd'” or “service cpanel restart” to fully update your server's configuration.

g. Install the needed plugins after consulting with the server owner and get them licensed and installed.


h. Install Firewall ( I will mention CSF here ) in the new server and copy the csf.conf , csf.allow, csf.pignore, csf.ignore, csf.deny files etc and restart firewall


i. Install SSL certificate for the services like cpanel/whm/webmail/exim/ftp etc and if old cert is having good amount of validity left, then ask the client to use the old cert and change hostname to match the old one or whether he will get new cert for the new hostname.


j. Other Hardening Steps done in old server and add more if there is anything which the current admin can do

5. Once you are sure the new server is setup almost similar / same as that of the old server and expect no issues after migration ask the customer for an off peak hours and get the initial Migration scheduled and perform an initial migration using cPanel Transfer tool.

During cPanel migration using transfer tool, Please check the Size of the accounts in the old server and do full transfer only for those accounts whose size in less and those who is having say more than 3 GB, better method to do those migrations will be make a list of those accounts, Do a Skip home migration while initial transfer and sync the home directories of those accounts using rsync command. A good system admin might be able to write a script to get these done automatically as it needs ssh trust added for password less execution of commands, some basic scripting for syncing files and databases.

6. Once the Initial Migration process is completed ( account copy using transfer tool and sync of those account which you used skip home via transfer tool and data sync of those users using rsync command),Please ask the customer to check the sites using offline method.

You can create the hosts file entry using the below command in the new server .

# grep -v nobody /etc/userdomains | awk -F\: '{print $1}' | sed -r 's/(.*)/202.60.64.189 \1 www.\1/g'

Some times you might need to educate the customer to how to do this check from his local PC.

7. When customer checks the sites and finds and issue , Please make sure to fix those server wide and ask customer to keep a track of changes he made related to site level or file level so that he can do those fixed after Final Sync of files and DB

8. Once this check step is completed by customer, ask him the time to do the Final Migration and then get it scheduled.

9. Prepare any Scripts needed or any changes needed to be made in the scripts made earlier for syncing. Please try to start the home sync first and db sync to be done just before dns change. So plan accordingly. You can do an additional home sync as well when you try restoring the db as well for extra secure for mails.

10. Once Final sync is completed, you can change the sites ip’s to new server using replace command in the old server


# cd /var/named
# replace 191.168.1.10 192.140.1.11 -- *.db
# replace 191.168.1.200 192.140.1.12 -- *.db


Replace the ip’s with correct one according to your old and new servers and restart named after these changes.

11. Login to the nameserver domain’s registrar control panel and change the ip’s of the nameservers to the new ones.

12. Check if all is fine from new server and make sure all is loading from new server.

13. If all is fine , then stop all the services from old server other than SSH and DNS and stop them in chkservd as well.

14. Ask the customer to keep this server for a few days so that you can sync any data if customer complains any thing missing. Also ask the customer to better to have a total server backup so that he can retrieve any thing if needed in future.

15. Change the IP / Hostname in the Nagios / Services / etc in your company if you are a server management company.


I hope these steps will be fine for a normal cPanel – Cpanel server migration.

Please email if you have any questions or suggestions to make on this doc so that I can make this better

 

Migrations<h1><em><strong>Perfect Cpanel - Cpanel Migration steps</strong></em></h1><h1>&nbsp;</h1><h3><strong>Migrations are always a head ache for customers and end-users. MainMain Reason for this is doing migrations without proper planning. IfIf we plan a migration then yes we can try to reduce the downtime of the sites to the least say 2 &ndash; 3 min. I agree that we might have to do migrations in a hurry like the old server is down due to hardware issues or some other bad disk issues. IfIf the migration is not properly done and sites are live then there are chances to get the sites getting updated in the old server and after dns propagations clients will start crying saying the data is missing. As a server admin I have seen this many times due to non-planning and customers always come in a hurry to us just before old server cancellation. Maincancellation.</strong></h3><p><strong>Main point is to Plan Migrations as early as possible and discusses the same with your Server Administrator. HereAdministrator.</strong></p><p><strong>Here I will be discussing a cPanel - cPanel Migrations Steps which is using DNS (nameservers) pointed to the same server which is having data and also will mention how we can do if you have nameserver cluster setup. SoSo steps will be divided into 2 criteria 1. cPanel –criteria</strong></p><p><strong>1. cPanel &ndash; cPanel migration whose nameservers are using same server’sserver&rsquo;s DNS installation and not having any cPanel dns only or DNS cluster setup. 2. cPanel</strong><br /><strong>2. cPanel - cPanel Migration Having DNS Cluster setup and not using server’sserver&rsquo;s DNS installationIinstallation</strong></p><p><strong>I am writing this Doc when the cPanel is at Version 11.58.x and discussing the first option which is the normal case.Migrationscase.</strong></p><p><strong>Migrations Steps whose nameservers are using same server’sserver&rsquo;s DNS installation1. Weinstallation</strong></p><p><strong>1. We should start preparing for migration atat least 24 &ndash; 48 hourshours prior to actualactual data migration. We should check all the domains in the old server and reduce ttl value atleast 24 hours before for all domains. If any domains is using external nameservers, then inform the client about the same and get it done in their remote nameserver section. Reducing TTL value will help to reduce the time of propagation and You can google more about the same if you wish to get exactly how this will help you during migration.Tomigration.</strong></p><p><br /><strong>To reduce the TTL value please use the below steps #steps</strong></p><blockquote><p><strong># cd /var/named #</strong><br /><strong># replace 14400 300 -- *.db#*.db</strong><br /><strong># replace 86400 300 -- *.dbPlease*.db</strong></p></blockquote><p><strong>Please change the values 14400 and 84400 values as per the old server in your case. Tocase.</strong></p><p><strong>To make those changes alive, we might need to restart dns service. /scripts/restartsrv named Ifservice.</strong></p><blockquote><p><strong>/scripts/restartsrv named</strong></p><p><strong>If you are using a DNS Cluster, or using cPanel dns only servers, then please proceed the same above steps in those servers and make sure the ttl of the domains has been changed to 300 seconds which is 5 min. Ifmin.</strong></p></blockquote><p><strong>If you are migrating the ip’sip&rsquo;s then you can ignore this steps as there might be now use in this but I will always suggest to this done as it will help us to revert any changes if anything happens and you have to revert all back to old server. 2. Orderserver.</strong></p><p><strong>2. Order the New server with similar partition structure as per the old server or just get a server with all space on a single / partition. IfIf you are planning to use SSD Drive for MySQL, then Please mount either /var/lib/mysql/var/lib/mysql as a separate partition. 3. Installpartition.</strong></p><p><strong>3. Install cPanel in the new server 4. Setupserver</strong></p><p><strong>4. Setup the New server as per the old server Mainserver</strong></p><p><strong>Main things which a client want to get migrated will be the below ones and some might want to replicate custom setups, Binary Installations, Additional settings outside the cPanel. It is always good to ask the customer whether he has any custom settings in the old server like some custom / shared file path for his sites, customcustom binary installations etc. a. Apacheetc.</strong></p><p><strong>a. Apache and Php modules You</strong><br /><strong> You can copy the Apache and php Modules using the below steps. If you have any profile saved and that is in use, then you can copy that profile from /var/cpanel/easy/apache/profile/custom/custom.yaml ( the name custom.yaml will be the name you gave while saving the profile). If you do not have any profile saved, then better use the /var/cpanel/easy/apache/profile/ _last_success.yaml First_last_success.yaml</strong></p><p><strong>First Sync the below folders and files and then do an easyapache/var/cpanel/easy/apache/custom_opt_mods//var/cpanel/easy/apache/prefs.yaml/var/cpanel/easy/apache/profile//var/cpanel/easy/apache/rawenv//var/cpanel/easy/apache/rawopts//var/cpanel/easy/apache/state.yaml# /scripts/easyapache Oreasyapache</strong></p><blockquote><p><strong>/var/cpanel/easy/apache/custom_opt_mods/</strong><br /><strong>/var/cpanel/easy/apache/prefs.yaml</strong><br /><strong>/var/cpanel/easy/apache/profile/</strong><br /><strong>/var/cpanel/easy/apache/rawenv/</strong><br /><strong>/var/cpanel/easy/apache/rawopts/</strong><br /><strong>/var/cpanel/easy/apache/state.yaml</strong></p><p><strong># /scripts/easyapache</strong></p></blockquote><p><strong>Or If you just need Apache/php modules from the last run easy apache, then simply copy /var/cpanel/easy/apache/profile/ _last_success.yaml filefile from old server to new server’sserver&rsquo;s /var/cpanel/easy/apache/profile/custom folder and rename the file name from _last_success.yaml to mycustom.yaml. Aftermycustom.yaml.</strong></p><p><strong>After renaming the file, Run easy apache using the below command #command</strong></p><blockquote><p><strong># /scripts/easyapache --build --profile=mycustom After--profile=mycustom</strong><br /> <br /><strong>After completion, please compare the modules and php handler using the below commands and make sure all are migrated properly. #properly.</strong></p><p><strong># php –m#&ndash;m</strong></p><p><strong># /usr/local/cpanel/bin/rebuild_phpconf --currentb. Php.ini--current</strong></p></blockquote><p><strong>b. Php.ini values (Server wide ones) Ifones)</strong></p><p><strong>If both old and new server have same version of php, then you can copy thethe /usr/local/lib/php.ini from old server toto new serverc. Mailserver</strong></p><p><strong>c. Mail Server settings Yousettings</strong></p><p><strong>You can take Exim Backups from old server from Home »Service&raquo;Service Configuration »Exim&raquo;Exim Configuration Manager »Backup&raquo;Backup Tab and click “Run Backup”.&ldquo;Run Backup&rdquo;. Once the backups is saved in localmachine, Login to new server and go to Home »Service&raquo;Service Configuration »Exim&raquo;Exim Configuration Manager »&raquo; Restore tab and upload the backup you downloaded from old server and Click “Restore Backup”.d. MySQL Settings If&ldquo;Restore Backup&rdquo;.</strong></p><p><strong>d. MySQL Settings</strong></p><p><strong>If the mysql versions are same you can just copy the /etc/my.cnf file from old server to new server and if mysql versions are different , then please try to use values from old server only if needede. Modneeded</strong></p><p><strong>e. Mod security settings and copy custom rules Checkrules</strong></p><p><strong>Check if the old server is using any Modsec rules like Atomiccorp, Comodo oror OWSAP etc and migratemigrate all those rules and confirm all are migrated as well. Also check if any vendor installation is there in old server and copy the same vendors first and then see if there is any custom rules added. f. cPaneladded.</strong></p><p><strong>f. cPanel Tweak Settings /var/cpanel/cpanel.configSettings</strong></p><p><strong>/var/cpanel/cpanel.config contains the settings that are displayed in the interface in Tweak Settings. Copy this file to new server and replace the existing one if cPanel versions are same for both old and new server. If versions are different, just check the files differences using diff command and manually add those changes which are needed for new server. Once you made necessary changes or replace the file, then you need to restart cpanel using “/usr/local/cpanel/scripts/restartsrv_cpsrvd'”&ldquo;/usr/local/cpanel/scripts/restartsrv_cpsrvd'&rdquo; or “service&ldquo;service cpanel restart”restart&rdquo; to fully update your server's configuration.g. configuration.</strong></p><p><strong>g. Install the needed plugins after consulting with the server owner and get them licensed and installed. h. Installinstalled.</strong></p><p><br /><strong>h. Install Firewall ( I will mention CSF here ) in the new server and copy the csf.conf , csf.allow,csf.allow, csf.pignore, csf.ignore,csf.ignore, csf.deny files etc andetc and restart firewalli. Installfirewall</strong></p><p><br /><strong>i. Install SSL certificate for the services likelike cpanel/whm/webmail/exim/ftp etc and if old cert is having good amount of validity left, then ask the client to use the old cert andand change hostname to match the old one or whether he will get new cert for the new hostname. j. Otherhostname.</strong></p><p><br /><strong>j. Other Hardening Steps done in old server and add more if there is anything which the current admin can do5. Oncedo</strong></p><p><strong>5. Once you are sure the new server is setup almost similar / same as that of the old server and expect nono issues after migration ask the customer for an off peak hours and get the initial Migration scheduled andand perform an initial migration using cPanel Transfer tool. Duringtool.</strong></p><p><strong>During cPanel migration using transfer tool, Please check the Size of the accounts in the old server and do full transfer only for those accounts whose size in less and those who is having say more than 3 GB, better method to do those migrations will be make a list of those accounts, Do a Skip home migration while initial transfer and sync the home directories of those accounts using rsync command. AA good system admin might be able to write a script to get these done automatically as it needs ssh trust added for password less execution of commands, somesome basic scripting for syncing files and databases. 6. databases.</strong></p><p><strong>6. Once the Initial Migration process is completed ( accountaccount copy using transfer tool and sync of those account which you used skip home via transfer tool and data sync of those users using rsync command),Please ask the customer to check the sites using offline method. Youmethod.</strong></p><p><strong>You can create thethe hosts file entry using the below command in the new server .# grep.</strong></p><p><strong># grep -v nobody /etc/userdomains | awk -F\: '{print $1}' | sed -r 's/(.*)/202.60.64.189 \1 www.\1/g'Somewww.\1/g'</strong></p><p><strong>Some times you might need to educate the customer to how to do this check fromfrom his local PC.7. PC.</strong></p><p><strong>7. When customer checks the sites and finds and issue , Please make sure to fix those server wide and ask customer to keep a track of changes he made related to site level or file level so that he can do those fixed after Final Sync of files and DB8. DB</strong></p><p><strong>8. Once this check stepstep is completed by customer, ask him the time to do the Final Migration and then get it scheduled. 9. Preparescheduled.</strong><br /> <br /><strong>9. Prepare any Scripts needed or any changes needed to be made in the scripts made earlier for syncing. PleasePlease try to start the home sync first andand db sync to be done just before dns change. So plan accordingly. YouYou can do an additional home sync as well when you try restoring the db as well for extra secure for mails. 10. Oncemails.</strong></p><p><strong>10. Once Final sync is completed, you can change the sites ip’sip&rsquo;s to new server using replace command in the old server #server</strong></p><blockquote><p><br /><strong># cd /var/named #</strong><br /><strong># replace 191.168.1.10 192.140.1.11 -- *.db#192.140.1.11 -- *.db</strong><br /><strong># replace 191.168.1.200 192.140.1.12 -- *.dbReplace192.140.1.12 -- *.db</strong></p><p><br /><strong>Replace the ip’sip&rsquo;s with correct one according to your old and new servers and restart named after these changes.11. changes.</strong></p></blockquote><p><strong>11. Login to the nameserver domain’sdomain&rsquo;s registrar control panel and change the ip’sip&rsquo;s of the nameservers to the new ones.12. ones.</strong></p><p><strong>12. Check if all is fine from new server and make sure all is loading from new server. 13. Ifserver.</strong></p><p><strong>13. If all is fine , then stop all the services from old server other than SSH and DNS andand stop them in chkservd as well. 14. Askwell.</strong></p><p><strong>14. Ask the customer to keep this server for a few days so that you can sync any data if customer complains any thing missing. AlsoAlso ask the customer to better to have a total server backup so that he can retrieve any thing if needed in future. 15. future.</strong></p><p><strong>15. Change the IP / Hostname in the Nagios / Services / etc in your company if you are a server management company. Icompany.</strong></p><p><br /><strong>I hope these steps will be fine for a normal cPanel &ndash; Cpanel server migration. Pleasemigration.</strong></p><p><strong>Please email if you have any questions or suggestions to make on this doc so that I can make this better better</strong></p><p>&nbsp;</p>