Since the actual list of files and folders to
rsync hasn't been noted, I'll provide a list of the files and folders I've used personally for
rsyncs in the past:
rsyncing, if your machines are on different OS or architectures, please remove the following file on the new server:
That file contains data on the old server's OS and architecture and is not interchangeable between systems.
If the old server IPs will be used for the new server, you might well want these files (be careful copying these otherwise as they'll change your main server IP to the old server's IP and should only be copied if you intend to switch to the new server shortly after a reboot with the old IP becoming the main IP on that new server):
After you copy over these files and folders, then you would want to rebuild Apache. The above files should include all the user data you need.
Normally, I would then create a file in
/tmp on the new server called
movelist and include the files and folders, then I would run the following command on the new server:
for file in
cat /tmp/movelist ;do rsync --archive --verbose --rsh=ssh oldserverIP:$file
$file --exclude '/var/cpanel/sysinfo.config' ;done
oldserverIP with the
IP for the old server.
Please note that you cannot use
cPanel restore files when using this method as the two methods are not interchangeable. It is either
cPanel backups and restores or
rsyncs. This is because the
cPanel backups when being restored on a system presume the account doesn't have files or folders already existing for the data. If the account exists in any fashion (the username in
/home/user/ exists, and so on), then the
cPanel backup cannot restore via
WHM on that system, although you can force a restore in
SSH using the
I also would highly suggest using dumps for MySQL data instead of this method if you have InnoDB MySQL database tables. If MySQL is running when you do an rsync like this for backups, the
/var/lib/mysql/ibdata1 file might corrupt. A corrupted InnoDB table or tables can cause MySQL to not start, so you are risking MySQL not working by using an
rsync. It's better to get a dump of the databases on top of the
rsync for MySQL.