BuycPanel Blog

BuycPanel Blog

Latest news and updates

The Overview of the cpcomftool Script

Posted by Allura on 03 07 2018.

A Brief Introduction

This /usr/local/cpanel/bin/cpconftool script basically helps you to backup, restore, and transfer server configurations when you migrate your cPanel or WHM account to a new server.

The following configurations are possible using this script:

  • Apache — the Apache configuration is used by cPanel & WHM to host websites. This configuration also consists of the system’s ModSecurity configuration. Apache uses ModSecurity to provide invasion detection and prevention of your server.
  • Backups — cPanel & WHM uses the backups configuration as the system’s primary backup and restore tool. This backup configuration excludes legacy backup configurations.
  • cPanel themes — cPanel & WHM uses it to generate the cPanel and WHM interfaces.
  • Exim — cPanel & WHM uses it as the system’s main mail transfer agent.
  • MySQL® — cPanel & WHM uses the MySQL configuration as the system’s primary operations tool.
  • WHM (whmconf) — cPanel & WHM uses it to back up and restore WHM’s common non-user-specific settings. For example, the settings from WHM’s Tweak Settings interface (WHM >> Home  >> Server Configuration >> Tweak Settings) and WHM’s  Basic WebHost Manager Setup interface (WHM >> Home >> Server Configuration >> Basic WebHost Manager Setup).

The /usr/local/cpanel/bin/cpconftool script

In order to use this script, run the following command:

/usr/local/cpanel/bin/cpconftool –argument


The /usr/local/cpanel/bin/cpconftool script accepts the following arguments:

Argument Description Example
–restore Restore a backup file. For more information, read the Restore a configurationsection below.



–backup Generate a backup file. For more information, read the Back up a configurationsection below.



–modules=cpanel::smtp::exim –backup



–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.



–modules=cpanel::smtp::exim –backup



Now you know what this cpcomftool script is all about and how to run this script in cPanel or WHM account. It helps you to backup, restore and transfer the data of your old server, which makes it very useful at the time of migration to a new server. Experience this feature offered in the cPanel interface by reducing your effort during the migration of your account from an old server to a new one.