Skip to main content

Copy cPanel Server configuration

cPanel 22 June 2022

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:

Code:
/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

 

Skip to end of metadata

Go to start of metadata

 

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 /usr/local/cpanel/bin/cpconftool script accepts the following arguments:

Argument
Description
Example
--restore

Restore a backup file.

 

--restore=/home/whm-config-backup-all-1.1-1411229033.tar.gz
--backup

Generate a backup file.

 

--backup=cpanel::system::tweaksettings,cpanel::smtp::exim

 

 

--list-modules List the available modules on your server.

The output will resemble the following example:

1
2
cpanel::system::tweaksettings
cpanel::smtp::exim
--modules

A comma-separated list of the modules to restore or back up.

Note:

You can pass this argument with the --restore and --backup arguments to restore or backup specific modules.

--modules=cpanel::system::tweaksettings,cpanel::smtp::exim

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"
Visit our FAQ for more information Get more info about Goline
0 0 votes
Article Rating
Subscribe
Notify of

0 Comments
Oldest
Newest Most Voted
Goline It Services Logo

News

  • GOLINE is pleased to announce that it has achieved ESET Gold Partner status for 2027. The recognition follows the successful completion of ESET’s partner certification requirements and confirms GOLINE’s continued investment in cybersecurity expertise and professional development. ESET’s partner programme is designed to support companies working with its cybersecurity solutions through dedicated technical and sales resources, training and other partner services. For GOLINE, the achievement further strengthens its collaboration with ESET and its ability to integrate ESET security technologies into the cybersecurity solutions and services it provides to businesses. ESET solutions are already part of GOLINE’s cybersecurity portfolio, alongside technologies...
  • GOLINE SA is excited to announce a new partnership with NetApp, a global leader in cloud data services and storage solutions. This collaboration aims to help organizations modernize their IT infrastructure, streamline data management, and enhance performance across cloud and hybrid environments. Modern Data Solutions for Businesses Through this partnership, GOLINE integrates advanced data management solutions, enabling businesses to securely store, manage, and access critical information across cloud, on-premises, or hybrid setups. Clients can benefit from: Flexible and scalable storage solutions to meet growing data needs Simplified management of cloud and on-premises environments Enterprise-grade security for sensitive and mission-critical data...
  • GOLINE SA is proud to announce a new strategic partnership with Omnissa, a global leader in digital workspace platforms and Horizon Cloud Service solutions. This collaboration marks a significant step forward in helping organizations embrace secure, flexible, and high-performance work environments. Why Choose Omnissa for Your Business? The platform enables virtual desktops, applications, and unified endpoint management. Organizations can deploy scalable workspaces across cloud, hybrid, or on-premises setups. Key benefits include: Easy access to desktops and apps on any device Centralized management for Windows, macOS, iOS, Android, and ChromeOS Strong security with access controls and multi-factor authentication Automated scaling to...
  • Hosting Services
  • +41 (0)91 260 76 50
0
Would love your thoughts, please comment.x
()
x
| Reply