ÇÎÐ ÈÇß ÇÈ áÌãíÚ ÇÚÏÇÏÇÊ ÇáÓíÑÝÑ WHM ãä ÎáÇá cpconftool Script
export config - Export only the WHM settings to a new server?
Back up a configuration module / restore - how to export whm server configuration
Clone a cPanel server configuration to a new server



Is there anything within WHM that I can export which will show the current config versions of things
such as PHP, MYSQL, Apache, PHPSU/Mod Ruid2 etc etc.
I would like to export only the settings I have already made.
How to: General Settings, Apache, Preferences ...
I do not want to configure everything again, is there any solution to this, besides the transfer tool?
äÚã , íãßäß ÇÎÐ ÈÇß ááÓíÑÝÑ ßÇãá< æáßä íÌÈ Çä ÊÚáã Çä ßá ÔìÁ ÏÇÎá ÇáÓíÑÝÑ Èíßæä ÚÈÇÑÉ Úä Modules


--------------------------------------------------------------------
ÇäæÇÚ Modules ÏÇÎá WHM ÇáÊì íãßä Úãá áåÇ Backup / Restore
--------------------------------------------------------------------


  • Apache® — cPanel & WHM uses Apache to host websites.
  • AutoSSL — The AutoSSL feature automatically issues free, Domain-Validated SSL certificates to users’ domains.
  • Backups — cPanel & WHM uses backups to copy or archive data. You can use this data to recover to a previous state.
  • cPanel themes — cPanel & WHM uses cPanel themes to generate the cPanel and the WHM interfaces.
  • cPHulk — The cPHulk service helps to protect your server against brute force attacks.
  • Exim — cPanel & WHM uses Exim as the server’s main mail transfer agent.
  • GreyListing — The Greylisting feature defends email users against spam.
  • ModSecurity — This open-source web application firewall helps to detect and prevent intrusion. For more information.
  • MySQL® — cPanel & WHM uses MySQL as the server’s database management.
  • WHM (whmconf) — cPanel & WHM uses the whmconf service to back up and restore WHM’s common settings that aren’t user-specific. 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).


--------------------------------------------------------------------
ÓßÑÈÊ Backup / Restore ááÜ Modules
--------------------------------------------------------------------

åÐÇ åæ ÇáÓßÑÈÊ

ßæÏ:
 usr/local/cpanel/bin/cpconftool --option
ãÚ ÇÓÊÈÏÇá --option ÈÇáãØáæÈ ÓæÇÁ ÈÇß ÇÈ / ÑíÓ澄 + ÇáãæÏíá ÇáÐì ÊÑíÏå ãä list-modules

--modules — (Required) A comma-separated list of the modules to restore or back up.
--backup — Generate a backup file.
--restore — Restore from a backup file.
--list-modules — List the available modules on your server.

--query-module-info — List information about the version of the module.
--verbose — Display details about the operation that the script performs.
--prerestore_backup — Restore the original version of the file.

ÇÏÎá åÐÇ ÇáßæÏ áßì ÊÌÏ ÇÓãÇÁ ÇáãæÏíá ÇáÊì åÊÞæã ÈÚãá áåÇ ÈÇß ÇÈ Çæ ÑíÓÊæÑ

ßæÏ:
/usr/local/cpanel/bin/cpconftool --list-modules
ÈÏÇÎá list-modules íæÌÏ :

ßæÏ HTML:
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
--------------------------------------------------------------------
ßíÝíÉ Úãá ÈÇß ÇÈ Backup a configuration module
--------------------------------------------------------------------

åäÇ ÇÏÎá åÐÇ ÇáÇãÑ Ýì ÇáÔá áÚãá ÈÇß ÇÈ ááÜ Configuration ááãæÏíá ÇáãØáæÈÉ æåã 10 ÝÞØ

ßæÏ:
/usr/local/cpanel/bin/cpconftool --backup --modules=configuration::to::backup
ãÚ ÇÓÊÈÏÇá configuration::to::backup ÈÜ cpanel::system::whmconf
ãËáÇ áßì íÊã ÇÎÐ ÇáÈÇß áå ÝÞØ æßÐáß íÊã ÇáÚãá Úáì ÇáÈÇÞí ÈäÝÓ ÇáØÑíÞÉ

ßæÏ:
/usr/local/cpanel/bin/cpconftool --backup --modules=cpanel::easy::apache
/usr/local/cpanel/bin/cpconftool --backup --modules=cpanel::smtp::exim
/usr/local/cpanel/bin/cpconftool --backup --modules=cpanel::system::autossloptions
/usr/local/cpanel/bin/cpconftool --backup --modules=cpanel::system::backups
/usr/local/cpanel/bin/cpconftool --backup --modules=cpanel::system::greylist
/usr/local/cpanel/bin/cpconftool --backup --modules=cpanel::system::hulk
/usr/local/cpanel/bin/cpconftool --backup --modules=cpanel::system::modsecurity
/usr/local/cpanel/bin/cpconftool --backup --modules=cpanel::system::mysql
/usr/local/cpanel/bin/cpconftool --backup --modules=cpanel::system::whmconf
/usr/local/cpanel/bin/cpconftool --backup --modules=cpanel::ui::themes
ÇãÇ ÇÐÇ ßäÊ ÊÑíÏ ÌãíÚ ãä Ýì list-modules Þã ÈÇÓÊÎÏÇã åÐÇ ÇáßæÏ ÌÇåÒ

ÍíË Êã æÖÚ ÌãíÚ modules ãÚ æÌæÏ ÝÇÕáÉ Èíäåã áßì íßæä ÇáÈÇß ÇÈ ÔÇãá

ßæÏ:
/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
Ëã ÇáäÊíÌÉ

ßæÏ:
Backup Successful
/home/whm-config-backup-1562881772.tar.gz
--------------------------------------------------------------------
ßíÝíÉ Úãá ÇÓÊÚÇÏÉ Restore configuration settings
-------------------------------------------------------------------

åäÇ ÇÏÎá åÐÇ ÇáÇãÑ Ýì ÇáÔá áÚãá ÑíÓ澄 ááÜ Configuration ááãæÏíá ÇáãØáæÈ æåã 10 ÝÞØ

ßæÏ:
/usr/local/cpanel/bin/cpconftool --restore=/home/backup.tar.gz --modules=configuration::to::restore
ãÚ ÇÓÊÈÏÇá configuration::to::restore ÈÜ cpanel::system::whmconf
ãËáÇ áßì íÊã ÇÎÐ ÇáÈÇß áå ÝÞØ æßÐáß íÊã ÇáÚãá Úáì ÇáÈÇÞí ÈäÝÓ ÇáØÑíÞÉ

ßæÏ:
/usr/local/cpanel/bin/cpconftool --restore=/home/backup.tar.gz --modules=cpanel::easy::apache
/usr/local/cpanel/bin/cpconftool --restore=/home/backup.tar.gz --modules=cpanel::smtp::exim
/usr/local/cpanel/bin/cpconftool --restore=/home/backup.tar.gz --modules=cpanel::system::autossloptions
/usr/local/cpanel/bin/cpconftool --restore=/home/backup.tar.gz --modules=cpanel::system::backups
/usr/local/cpanel/bin/cpconftool --restore=/home/backup.tar.gz --modules=cpanel::system::greylist
/usr/local/cpanel/bin/cpconftool --restore=/home/backup.tar.gz --modules=cpanel::system::hulk
/usr/local/cpanel/bin/cpconftool --restore=/home/backup.tar.gz --modules=cpanel::system::modsecurity
/usr/local/cpanel/bin/cpconftool --restore=/home/backup.tar.gz --modules=cpanel::system::mysql
/usr/local/cpanel/bin/cpconftool --restore=/home/backup.tar.gz --modules=cpanel::system::whmconf
/usr/local/cpanel/bin/cpconftool --restore=/home/backup.tar.gz --modules=cpanel::ui::themes
ÇãÇ ÇÐÇ ßäÊ ÊÑíÏ ÌãíÚ ãä Ýì list-modules Þã ÈÇÓÊÎÏÇã åÐÇ ÇáßæÏ ÌÇåÒ

ÍíË Êã æÖÚ ÌãíÚ modules ãÚ æÌæÏ ÝÇÕáÉ Èíäåã áßì íßæä ÇáÑíÓ澄 ÔÇãá

ßæÏ:
/usr/local/cpanel/bin/cpconftool --restore=/home/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
Ëã ÇáäÊíÌÉ

ãÚ ãÑÇÚÇå ÊÛííÑ ÇÓã ÇáãáÝ restore=/home/backup.tar.gz ÈÇáÕÍíÍ ÚäÏß

Ëã ÇáäÊíÌÉ

åíÊã ÇÓÊÈÏÇá ÇáÇåÏÇÏÇÊ ÇáÞÏíã ÈÇáÌÏíÏÉ æÝì ÍÇáÉ æÌæÏ ãÔßáÉ åíÊæÞÝ æ åíÑÌÚ ßãÇ ßÇä Ïæä Çì ãÔÇßá

The script removes any configuration files on the destination server that did not exist the source server.

When you restore a configuration module, the following actions occur:
The system restores all of the configuration files.
The /usr/local/cpanel/bin/cpconftool script tests whether the configuration settings are valid.

The /usr/local/cpanel/bin/cpconftool script runs the /usr/local/cpanel/scripts/buildeximconf script.
If the test fails, the script reverts the changes.
If the test succeeds, the script restarts the service.


The restoration process returns output that resembles the following example:

Ýì ÍÇáÉ Çä ÇáÇÓÊÚÇÏÉ ÊãÊ ÈÔßá Óáíã íÙåÑ áß
Restore Successful
---
cpanel::system::whmconf:
post_restore:
status: 1
statusmsg: Update WHMhostmgr Succeeded
restore:
data:
warnings: []
status: 1
statusmsg: "Whostmgr::Config::Restore::System::WHMConf: ok"
----------------------------------------------------------------
ÇáÎáÇÕÉ
----------------------------------------------------------------

Cloning should include:
ÇáÈÇß ÇÈ íÔãá

  • Tweak Settings (i.e. /var/cpanel/cpanel.config)
  • Exim Configuration
  • Feature Lists
  • Packages
  • Custom EasyApache Profiles
  • Reseller ACLs
  • Statistics Software Configuration
  • Update Preferences
  • /var/cpanel/rpm.versions.d
  • Other settings to be defined


Cloning should explicitly exclude:
ÇáÈÇß ÇÈ áÇ íÔãá

  • IP Addresses
  • Nameservers
  • Hostname
  • cPanel Accounts
  • Anything that is server-specific


ÇáãÑÌÚ :
https://documentation.cpanel.net/dis...onftool+Script
https://docs.cpanel.net/whm/scripts/...ool-script/84/
https://forums.cpanel.net/threads/export-config.665433/
https://forums.cpanel.net/threads/ex...server.647121/
https://www.hostgoi.com/my/knowledge...anguage=arabic