1

I have dedicated server running centos with whm/cpanel and Processor of this server is Intel Xeon Dual Core, 2.3GHz (4 threads). We installed and setup the module, plugins and settings which we required for our website. Now our website become much traffic so we needed to migrate to new high end server.

Now we bought new dedicated server with Intel Core I7 3770 | 3.4GHz/3.8GHz | 4 Cores/8 Threads

Now we want to migrate our all data to new server.

my question is

Do i need to manually configure a whole again and do cpanal transfer? I know i can do this via rsync.

Will it work?

I am not sure will kernel will panic?

Rahul Gavande
  • 324
  • 2
  • 11

2 Answers2

1

It's recommended that you do a clean install and migrate accounts over. Here's a quick script to package all accounts:

cat /var/cpanel/users | while read a; do
/scripts/pkgacct $a
done

You can also add the following to the script (before 'done') if you want to automatically make the backups available from a public URL so you can wget from the new server:

cp /home/cpmove* /etc/httpd/htdocs/
chmod 777 /etc/httpd/htdocs/cpmove*

For restoring:

Create a accs.txt file in root with list of usernames for all accounts being transferred. Then you can run this script:

#!/bin/bash
cat /root/accs.txt | while read a; do
cd /home/
wget http://server-hosting.com/cpmove-$a.tar.gz
/scripts/restorepkg $a
done

And if you're desperate to save some time, you can backup the config of your old server and restore on your new server (I recommend doing this after you have all your plugins installed, php compiled with same modules as before, etc)

# /usr/local/cpanel/bin/cpconftool --backup
Backup Successful
/home/whm-config-backup-all-DATE.tar.gz
AP 2022
  • 738
  • 1
  • 5
  • 20
1

Deployment automation is better to be done with puppet, ansible, saltstack, chef or any other available tool.

Take a loot at "Clone a cPanel server configuration to a new server (excluding server specific items)" feature request, and the comment that says "This feature is unnecessary and a waste of cPanel development resources. ..."

Alireza Savand
  • 3,462
  • 3
  • 26
  • 36