Also, /usr/local/cpanel/bin/cpconftool will back up and restore the Exim configuration and Tweak Settings. The Tweak Settings are mostly stored in /var/cpanel/cpanel.config, so this does overlap some of the information I mentioned in my previous post, but I wanted to mention it because it could be helpful to you. Here is the usage:
/usr/local/cpanel/bin/cpconftool –help /usr/local/cpanel/bin/cpconftool [–restore=file|–backup|–list-modules] [–modules=MODULE,MODULE,MODULE]
When you run it with the –backup argument, it will create a tarball (.tar.gz file) that you can copy to the new server and restore using the –restore= argument. This tool only works with Tweak Settings and the Exim configuration at this time, so for other data like EasyApache profiles, you will still need to use the methods I described in my previous post.
The cpconftool Script
For cPanel & WHM version 11.50
Overview
The /usr/local/cpanel/bin/cpconftool
script backs up and restores the Exim configuration file and cpanel.config
file. This is useful, for example, when you migrate your cPanel & WHM accounts to a new server.
The /usr/local/cpanel/bin/cpconftool
script
To use this script, run the following command as the root
user:
/usr/local/cpanel/bin/cpconftool –argument |
Arguments
The
script accepts the following arguments:/usr/local/cpanel/bin/cpconftool
Argument | Description | Example | ||
---|---|---|---|---|
–restore | Restore a backup file.
|
| ||
–backup | Generate a backup file.
|
| ||
–list-modules | List the available modules on your server. | The output will resemble the following example:
| ||
–modules | A comma-separated list of the modules to restore or back up. Note: You can pass this argument with the |
|
Example
To restore the settings in the cpanel::system::tweaksettings
module from a specific backup file, run the following command:
/usr/local/cpanel/bin/cpconftool –restore=/home/whm-config-backup-all-1.1-1434047759.tar.gz –modules=cpanel::system::tweaksettings |
The output will resemble the following example:
1 2 3 4 5 6 7 8 9 10 11 | cpanel::system::tweaksettings: post_restore: –snip– status: 1 statusmsg: Update TweakSettings Succeeded restore: data: warnings: [] status: 1 statusmsg: "Whostmgr::Config::Restore::System::TweakSettings: ok" |