Page tree
Skip to end of metadata
Go to start of metadata

This document is for a previous release of cPanel & WHM. To view our latest documentation, visit our Home page.

For cPanel & WHM 11.48

Overview

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. Destinations that you configure with the upload_system_backup parameter set to 0 will not receive the system backup files. 

Warning:

  • 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. If you wish to restore content from system backup files, you must perform the restoration manually.

Note:

 For more information about how to set up system backups or configure an additional destination, read our Backup Configuration documentation.

 

System backup files and directories

cPanel & WHM backs up the following files and directories:

Files

/etc/exim.conf
/etc/exim.conf.local
/etc/exim.conf.localopts
/etc/namedb/named.conf
/etc/rc.conf
/etc/named.conf
/etc/proftpd.conf
/etc/localdomains
/etc/httpd/conf/httpd.conf
/etc/group
/etc/shadow
/etc/master.passwd
/etc/passwd
/etc/fstab
/etc/ips
/etc/ips.remotemail
/etc/ips.remotedns
/etc/reservedips
/etc/reservedipreasons
/etc/quota.conf
/etc/wwwacct.conf
/etc/remotedomains
/etc/rndc.conf
/etc/secondarymx
/etc/my.cnf
/root/.my.cnf
/usr/local/apache/conf/httpd.conf

Directories

/etc/namedb
/etc/valiases
/etc/proftpd
/etc/vdomainaliases
/etc/ssl
/etc/vfilters
/usr/local/frontpage
/usr/share/ssl
/usr/local/cpanel/3rdparty/mailman
/var/lib/rpm
/var/lib/named/chroot/var/named/master
/var/named
/var/cpanel
/var/spool/cron
/var/cron/tabs
/var/spool/fcron
/var/log/bandwidth
/var/ssl
/var/lib/mysql 

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 a fully qualified path to any files that you wish to back up (for example, /etc/example.conf).

Note:

The server administrator can edit the /etc/my.cnf file to change the MySQL data directory location. In such a case, WHM 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, modify the configuration file manually or use a series of API calls.

Note:

For more information, read our WHM API 1 documentation.

 

Manual configuration method

To manually modify the configuration file of an additional destination, perform the following steps:

  1. Identify the configuration file in the /var/cpanel/backups directory.
    • Each destination has its own configuration file.
    • The file name contains the name of your destination, the UID label, and a UID string of characters. For example:

      myftp_UID_Z6rdq0rko2Z28uWTIN33SeCY.backup_destination

      Note:

      The UID sequence prevents conflicts with previously-created destinations that share the same name.

  2. Open the file with a text editor and add the following line:

    upload_system_backup: 1
  3. Save the file.

API call method

To use API calls to modify the configuration file of an additional destination, perform the following steps:

  1. Call the WHM API 1 - backup_destination_list function to retrieve the ID of the additional destination to which you wish to send system backups.

  2. Call the WHM API 1 - backup_destination_set function and include the following parameters and values:
    • id —  the ID that the backup_destination_list function returned.
    • upload_system_backup1

Logs

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. 

Notes

The additional destination configuration file uses the YAML format, which contains a simple associative array. For more information about YAML, read the YAML documentation.

Warning:

For security purposes, ensure that the system stores the backups on a server that is on your secure network. If your backups will not transfer to a server on your secure network, use a secure method such as SFTP, Amazon S3™, or WebDAV with SSL.