Introduction
The information in this guide is based on the following documentation:
Procedure
Login to your cPanel server via SSH as the root user.
Issue the following command to view the configuration modules available to backup to help you decide which you need:
/usr/local/cpanel/bin/cpconftool --list-modules
If you're unsure about which modules you should backup, feel free to review the documentation for more in-depth guidance.
The following command will backup all of the available modules into one compressed file:
/usr/local/cpanel/bin/cpconftool --backup --modules=cpanel::easy::apache,cpanel::smtp::exim,cpanel::system::autossloptions,cpanel::system::backups,cpanel::system::greylist,cpanel::system::hulk,cpanel::system::modsecurity,cpanel::system::mysql,cpanel::system::whmconf,cpanel::ui::themes
Once you have run the command to generate the backup file, transfer it to the destination server.
To restore the backup with all modules, run the following command, and replace the path to the backup file with your own:
/usr/local/cpanel/bin/cpconftool --restore=/path/to/backup.tar.gz --modules=cpanel::easy::apache,cpanel::smtp::exim,cpanel::system::autossloptions,cpanel::system::backups,cpanel::system::greylist,cpanel::system::hulk,cpanel::system::modsecurity,cpanel::system::mysql,cpanel::system::whmconf,cpanel::ui::themes