Hostgator Cpanel Whm Server

Migration Process Documentation

  1. Login to cpanel.
  2. In the files category of the cpanel dashboard, select Backup.
  3. Select Download a Full Account Backup.
  4. Set Home Directory as the destination.
  5. Enter email address for backup notification.
  6. Select Generate Backup.
  7. Wait... Start time: 09:29 AM End Time: 10:51 AM
  8. When an email is received indicating that the backup is complete, refresh the page.
  9. Click the download link.
  10. Wait for the download to complete. Filesize: 17.0 GB
  11. Login to aws.
  12. Go to EC2 (use the search box).
  13. Click on "Launch Instance".
  14. Choose Minimal CENT OS 7 install from the AWS Marketplace.
  15. Choose t2.medium.
  16. Click Create new IAM role.
  17. Click Create Role.
  18. Choose EC2.
  19. Choose Administrator Access.
  20. Add an appropriate tag (in this case category: test-migration).
  21. Create role name.
  22. Go back to the EC2 configuration.
  23. Click the refresh icon next to the IAM role dropdown.
  24. Select the role that was just setup in the dropdown.
  25. Check Enable CloudWatch detailed monitoring.
  26. Click Create new file system.
  27. Use the defaults on the first step.
  28. Add appropriate tags (in this case category: test-migration).
  29. Click Next Step then Create Filesystem.
  30. Go back to the EC2 configuration.
  31. Click the refresh icon next to the File systems buttons.
  32. Click Add Filesystem.
  33. Click Next: Add Storage.
  34. Adjust the size of the root volume to 100.0 GB.
  35. Click Next: Add Tags.
  36. Add appropriate tags (in this case category: test-migration).
  37. Click Next: Configure Security Group.
  38. In the Source dropdown, select My IP.
  39. Add a description (in this case ssh for david desktop).
  40. Add any additional IP addresses that should be allowed to SSH into the EC2 instance.
  41. Add the following additional rules:
HTTP with source anywhere
HTTPS with source anywhere
DNS (UDP) with source anywhere
DNS (TCP) with source anywhere
Custom TCP 2077 with source anywhere
Custom TCP 2078 with source anywhere
Custom TCP 2082 with source anywhere
Custom TCP 2083 with source anywhere
Custom TCP 2086 with source anywhere
Custom TCP 2087 with source anywhere
Custom TCP2096 with source anywhere
Custom TCP 3306 with source anywhere
Custom TCP 2525 with source anywhere
  1. Click Review and Launch.
  2. Double check the configuration, then click Launch.
  3. In the key pair popup, choose sensible options (in this case Create a new key pair with a name of test-migration).
  4. If you opted to create a new key pair, be sure to download it before continuing!
  5. Click Launch Instances.
  6. Wait...
  7. Click Services in the top left then search for and select route53.
  8. Under DNS management click Get started now.
  9. Click Create Hosted Zone.
  10. Click Create Hosted Zone again.
  11. Enter a domain name.
  12. Click Create.
  13. In the Hosted Zones view of Route 53, update nameservers with domain registrar to be those listed in AWS.
  14. Click Create Record Set.
  15. For the name, enter cpanel.
  16. Copy the public IP of the EC2 instance into the value box.
  17. Click Create.
  18. Wait for DNS to propogate.
  19. Verify cpanel.example.com with https://dnschecker.org
  20. Go back to EC2 and select Instances from the side menu.
  21. Copy the EC2 instances public DNS (IPv4) (in this case ec2-3-94-87-1.compute-1.amazonaws.com).
  22. Open git bash.
  23. Navigate to the location of the key pair that was selected.
  24. ssh -i test-migration.pem [email protected]
  25. sudo -s
  26. yum update
  27. Accept the updates.
  28. Wait...
  29. yum install perl
  30. yum install wget
  31. hostname cpanel.example.com
  32. Disable the network manager...
  33. stop NetworkManager
  34. disable NetworkManager
  35. systemctl enable network.service
  36. systemctl start network.service
  37. cd /home && curl -o latest -L https://securedownloads.cpanel.net/latest && sh latest
  38. Wait...
  39. sudo reboot
  40. Wait...
  41. Refer to steps 62-65 to reconnect to the server.
  42. sudo -s
  43. Setup the password for WHM by running: passwd.
  44. cd /etc/dhcp/dhclient-exit-hooks.d/
  45. sudo vi set-hostname.sh
  46. Add the following contents to the new file and exit with :x + ENTER.
#!/bin/sh
hostname cpanel.example.com
/scripts/fixetchosts
  1. chmod 744 set-hostname.sh
  2. Go to https://cpanel.example.com:2087
  3. Login with the username root and the password set in step 84.
  4. Use the WHM transfer tool to transfer the data on sta.stariumxcv.com to the new server.
References: