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