There are various scenarios where a user might need to migrate from one cPanel server to another. These can include server upgrades, changing hosting providers, consolidating servers, or optimizing resources. Whatever the reason, having a robust migration process ensures minimal downtime and data integrity throughout the transition.

In this blog, we’ll unveil the secrets of manual cPanel to cPanel migration using the powerful pkgacct and restorepkg cPanel scripts. Whether you’re a seasoned server administrator or a hosting provider, mastering this migration technique will streamline your processes and ensure seamless transitions for your clients. Let’s dive in!

Steps for the cPanel to cPanel server migration

Step 1: Safeguarding Your Data – Backup cPanel Accounts on the Source Server The journey of migration begins with safeguarding your precious data. With the pkgacct script, you can create comprehensive backups of individual cPanel accounts effortlessly. Execute the following command:

/scripts/pkgacct username

Replace “username” with the cPanel account you intend to back up. Alternatively, to streamline the process for multiple accounts, navigate to the user directory and execute the following loop:

cd /var/cpanel/users

for i in *; do /scripts/pkgacct $i; done

Step 2: Secure Transfer – Copy Backup Files to the Destination Server Once your backups are secured, it’s time to ferry them to their new home. Utilize SCP (Secure Copy Protocol) for secure and efficient transfer. Execute the following command:

scp -P 22 root@<Source IP>:/home/cpmove*.tar.gz /backup

Replace “<Source IP>” with the IP address of your source server. This command gracefully copies all backup files (cpmove*.tar.gz) from the source server’s /home directory to the designated /backup directory on the destination server.

Step 3: Restore cPanel Backups on the Destination Server With your backups safely transferred, it’s time to breathe life into them on the destination server. Navigate to the backup directory and unleash the power of the restorepkg script. Execute the following command:

cd /backup

for i in `ls -alh cpmove*.tar.gz`; do /scripts/restorepkg $i; done

This command gracefully navigates to the /backup directory and meticulously restores each backup file (cpmove*.tar.gz) using the restorepkg script, ensuring that every aspect of your cPanel accounts is seamlessly transitioned to their new home.

Conclusion

By following the steps outlined in this guide, you’ve empowered yourself to execute seamless migrations with minimal downtime and maximum efficiency. Whether you’re a seasoned server administrator or a hosting provider, this definitive guide serves as your beacon of knowledge in the realm of cPanel to cPanel server migration. Happy migration!

Read our cPanel to Plesk migration blog if you are migrating your cPanel server to Plesk.

cPanel to cPanel Server Migration

By Cherry

Systems Engineer, InsightDials

error: Content is protected !!