Here’s a step-by-step guide on how to migrate a cPanel/WHM server to another cPanel/WHM server using the command line interface (CLI):

  1. Prepare the new server Before migrating your cPanel/WHM server to a new one, you need to prepare the new server. Make sure that the new server meets the minimum requirements for cPanel/WHM, and that it has a fresh installation of the same version of cPanel/WHM that is running on the old server. You can use the cPanel/WHM installation guide to install cPanel/WHM on the new server.
  2. Generate a backup of the old server On the old server, generate a full backup of all accounts and configurations using the following command:
/usr/local/cpanel/bin/backup --force

This command will create a compressed tarball of all accounts and configurations in the /backup directory.

  1. Copy the backup to the new server Using a tool like scp, copy the backup tarball from the old server to the new server:
javascriptCopy codescp /backup/cpmove-*.tar.gz user@new-server-ip:/home/
  1. Restore the backup on the new server On the new server, restore the backup using the following command:
/scripts/restorepkg --force /home/cpmove-*.tar.gz

This command will restore all accounts and configurations from the backup file to the new server.

  1. Update DNS records After restoring the accounts on the new server, you need to update the DNS records of the domains to point to the IP address of the new server. You can either update the DNS records manually or use a DNS management tool like WHM’s DNS Zone Editor.
  2. Test the new server Once the DNS records have propagated, you should test the new server to make sure that everything is working as expected. You can use a tool like Pingdom or GTmetrix to check if the website is accessible and working properly.

Congratulations! You have now migrated your cPanel/WHM server to a new server using the command line interface.

I hope this helps! Let me know if you have any questions or need further assistance.

Previous ArticleNext Article

Leave a Reply

Your email address will not be published. Required fields are marked *