If you enable system backups, your server saves system backup files in the local backup directory (
/backup) by default. To save the system backup files to an additional destination, you must set the
upload_system_backup parameter to
1 in each additional destination configuration file.
The backup script uploads a
.tar file that contains all of the system backup files to each destination that you configure to receive system backups. The system will not send system backups to destinations with a
upload_system_backup parameter value of
You must perform the following actions for the system to save system backup files:
Configure an additional destination.
Select the Backup Configuration option for the Retain backups in the default backup directory setting.
cPanel & WHM does not include an interface to restore system backup files. To restore content from system backup files, you must perform the restoration manually.
System backup files and directories
cPanel & WHM backs up the following files and directories:
The server backs up DNSSEC databases as part of the system files backup. The system may corrupt the DNSSEC database if it encounters an OOM (Out Of Memory) or disk full condition. Also, the sysadmin may also corrupt this database inadvertently.
The sysadmin can restore the database from the system backup files. If they do not back up system files, they will need to perform the following steps:
Regenerate the DNSSEC keys for each domain that lost keys.
Tell their users to register the new keys with their registrar.
To configure system backups to include custom files or directories, create a new file or directory in the
/var/cpanel/backups/extras directory (for example,
/var/cpanel/backups/extras/etc). In that file, enter an absolute path to any files that you wish to back up (for example,
/etc/my.cnffile to change the MySQL data directory location. The system will back up the directory at its new location.
How to configure an additional destination to receive system backups
To configure an additional destination to receive system backups, perform one of the following procedures:
After you select Destination Type and click Create new destination in WHM’s Backup Configuration interface (WHM >> Home >> Backup >> Backup Configuration), select the Transfer System Backups to Destination checkbox.
Manual configuration method
To manually modify the configuration file of an additional destination, perform the following steps:
Identify the configuration file in the
Each destination requires its own configuration file.
The file name contains the destination name, the User ID (UID) label, and a UID character string. For example:
myftp_UID_Z6rdq0rko2Z28uWTIN33SeCY.backup_destinationNote:The UID sequence prevents conflicts with previously-created destinations that share the same name.
Open the file with a text editor and add the following line:
Save the file.
API call method
To use API calls to modify the configuration file of an additional destination, perform the following steps:
Call the WHM API 1
backup_destination_listfunction to retrieve the ID of the additional destination to which you wish to send system backups.
Call the WHM API 1
backup_destination_setfunction and include the following parameters and values:
id— The ID that the
The System Backups initialization logs to the
/usr/local/cpanel/logs/error_log file. The
error_log file points to the individual account package logs. For more information, read our The cPanel Log Files documentation.
The additional destination configuration file uses the YAML format, which contains a simple associative array. For more information about YAML, read the YAML documentation.