Knowledgebase

Backup Configuration  Print this Article

Overview:

The Backup Configuration interface allows system administrators to customize their scheduled backups.

Note:

The system applies the current Backup Configuration settings to accounts that you create or transfer.

The Backup Settings tab

Use the Backup Settings tab to enable and set up your backup configuration.

Backup Status

Select Enable Backups to back up your WHM account files. This setting is disabled by default.

Warning:

Global Settings

Configure the following global backup settings for your WHM account.

  • Backup Type — Select one of the following settings to determine how the system stores backup files:

    • Compressed — Select this setting to save all of your information in a compressed format. This setting uses less disk space but requires more time to finish a backup.
    • Uncompressed — Select this setting to save all of your information in an uncompressed format. This setting uses more disk space but runs faster than Compressed backups.
    • Incremental — Select this setting to save all of your files in the directory tree. This setting uses a combination of hard links and files for speed and to save disk space.
  • Check the Available Disk Space — Select this checkbox to enable the system to check whether the server contains the minimum free disk space available to create local backups. The system enables this setting by default.

    Warning:
    • If the server runs out of free disk space, critical services may no longer function until you create more available space.
    • If you do not select this setting, the server will run backups regardless of the amount of free disk space available.
    After you select the Check the Available Disk Space checkbox, you can perform the following steps:

     

    1. Enter the amount of free disk space that the backup system requires before it performs backups.
    2. Select one of the following units of measurement:
    3. % — Percent of available disk space.
    4. MB — Megabytes.
  • Maximum Destination Backup Timeout — Enter the maximum number of seconds to allow a backup process to upload a single backup file to a destination.

    Note:

    Ensure that the number of seconds that you enter will provide enough time for the system to upload your largest backup file.

     

  • Maximum Backup Restoration Timeout — Enter the maximum number of seconds to allow a backup process to restore a single backup file.

    Note:

    Ensure that the number of seconds that you enter will provide enough time for the system to restore your largest backup file.

     

Scheduling and Retention

Note:

You must select at least one of these settings.

The Scheduling and Retention settings allow you to specify when to run the backup process. Select to run backups on a daily, weekly, or monthly basis, or you may use a combination of these settings. Select the checkboxes that correspond to the timing settings that you wish to use:

  • Daily Backup — Your system creates a new backup on each of the days of the week that you select. If you select this setting, you must perform the following actions:

    1. Select which days you wish to run backups.

    2. In the Retention text box, enter the maximum number of daily backup files to store on your system at any given time. The system stores these backups after a backup completes successfully. Enter any number between 1 and 9999.

    3. To remove successful and unsuccessful backups, select the Strictly enforce retention, regardless of backup success checkbox. The system will remove all backups that are over the number you set in Retention text box. For more information, read our Backup Retention Behavior documentation.

  • Weekly Backup — Your system creates a new backup once each week on the day that you select. If you select this setting, you must perform the following actions:

    1. Select which day of the week you wish to run backups.

    2. In the Retention text box, enter the maximum number of weekly backups to store on your system at any given time. The system stores these backups after a backup completes successfully. Enter any number between 1 and 9999.

    3. To remove successful and unsuccessful backups, select the Strictly enforce retention, regardless of backup success checkbox. The system will remove all backups that are over the number you set in Retention text box. For more information, read our Backup Retention Behavior documentation.

  • Monthly Backup — Your system creates a new backup either once or twice per month, on the first or 15th day of each month. If you select this setting, then you must perform the following actions:

    1. Select which days of the month you wish to run backups.

    2. In the Retention text box, enter the maximum number of monthly backups to store on your system at any given time. The system stores these backups after a backup completes successfully. Enter any number between 1 and 9999.

    3. To remove successful and unsuccessful backups, select the Strictly enforce retention, regardless of backup success checkbox. The system will remove all backups that are over the number you set in Retention text box. For more information, read our Backup Retention Behavior documentation.

Note:

If you run daily and monthly backups on the same day, the daily backup runs first. When the daily backup completes, the monthly backup copies the daily backup.

Files

Warning:
  • You must select either the Back up User Accounts checkbox or the Back up System Files checkbox in order to run backups. You may also select both.
  • Although you do not need to back up your system files to back up account data, we strongly recommend that you back up your system files.
  • The backup process for an account near or over its quota may fail because the system cannot write necessary files, such as a database lock file.

The Files settings allow you to configure which information you wish to back up. Use the checkboxes to enable or disable your preferred settings:

  • Back up User Accounts — Select the Back up User Accounts checkbox to create backups for cPanel accounts. Click Select Users to select individual cPanel accounts to back up. This action opens the Backup User Selection interface (WHM >> Home >> Backup >> Backup User Selection).

  • Back up Suspended Accounts — Select the checkbox to back up suspended accounts.

    Warning:
    • If you do not enable this setting, your server will not back up suspended accounts, regardless of the setting in the Backup User Selection interface (WHM >> Home >> Backup >> Backup User Selection).

    • If you do not enable the Back up User Accounts setting, you will disable WHM’s File and Directory Restoration interface (WHM >> Home >> Backups >> File and Directory Restoration) and hide cPanel’s File and Directory Restoration interface (cPanel >> Home >> Files >> File and Directory Restoration). For more information, read the How to Manage Metadata Settings documentation.

    • The system cannot back up the contents of a suspended user’s public_ftp directory. For more information, read our What Happens When You Suspend an Account documentation.

     

  • Back up Access Logs — Select the checkbox to back up your server’s access logs and the /usr/local/apache/domlogs file.

  • Back up Bandwidth Data — Select the checkbox to back up your server’s bandwidth data.

  • Use Local DNS — Select the method to back up the Domain Name System (DNS) information:

    • Deselect the checkbox — The system backs up DNS information from the DNS cluster.
    • Select the checkbox — The system backs up DNS information from the server that hosts the domain.
  • Back up System Files — Back up your server’s system files.

    Note:
    • The system stores many of these files in the /etc directory.
    • You must enable this setting for server restoration.
    • We strongly recommend that you enable this setting.
    • For more information, read our System Backups documentation.

     

Databases

Select one of the following settings for the Back up SQL Databases setting. Use this setting to determine how to back up SQL databases.

  • Per Account Only — Use the mysqldump utility to create backup files with the .sql file extension for each account.
  • Entire MySQL Directory — Back up all files in the MySQL® data directory (/var/lib/mysql/ by default).
  • Per Account and Entire MySQL Directory — Back up all files in the MySQL data directory (/var/lib/mysql/ by default) and use the mysqldump utility to create backup files with the .sql extension for each account.
Warning:

Exercise extreme caution if you select the Entire MySQL Directory or Per Account and Entire MySQL Directory options. These options back up your databases without stopping MySQL, which may cause InnoDB issues in the backup file. The system can’t restore backup files with InnoDB issues.

Configure Backup Directory

Warning:
  • We strongly recommend that you also save your backups to a remote Additional Destinations location.

  • The backup process and the transfer process use separate queues. If each backup completes much faster than each transfer, backup files can accumulate on the server and fill the hard drive.

  • We strongly recommend that you do not perform backups to remote filesystems (for example, NFS, CIFS, smbfs, or other types of network drive systems). While you can back up directly to a remote filesystem, cPanel & WHM does not support this configuration. We strongly recommend that you work with a qualified system administrator to manage this custom backup path and avoid potential risks.

  • We strongly recommend that you use unique filepaths when you store multiple-server backups in a shared filesystem. This action prevents backup file conflicts.

  • To prevent performance degradation, the system automatically disables quotas on non-root filesystems that contain a backup destination.

The following settings allow you to specify where to save your backups:

  • Default Backup Directory — To change the default backup directory, enter the absolute path to the desired directory location.

    Note:

    By default, the system saves backup files locally to the /backup directory.

     

  • Backup Staging Directory — The system uses the backup staging directory when restoring backups from a remote server. The backup staging directory stores the remote backup’s files and directories during a backup restoration. The system empties the directory after the system restores the backup. You can change the backup staging directory path. Enter an absolute path to update the backup staging directory.

    Important:
    • The system restores backups one at a time. The backup staging directory must be large enough to contain the largest remote backup file that you wish to restore. For example, if you wish to restore three backups, sized 1.5 GB, 528 MB, and 950 MB each, your backup staging directory must be able to hold at least 1.5 GB.
    • By default, the system stages remote backup files locally in the /backup directory.

     

  • Retain Backups in the Default Backup Directory — Select this checkbox to retain each account backup in the /backup directory after the backups transfer to another destination. If you do not select this setting, your server deletes account backup files from the /backup directory only after the following events occur:

    • The system successfully transfers the backup file to at least one additional destination.
    • The system attempts, successfully or unsuccessfully, to transfer the backup file to all of your additional destinations.
      Warning:
      • If you do not select the Retain Backups in the Default Backup Directory setting and do not specify a destination in the Additional Destinations section, the system will return the following error: Error: Nowhere to back up: no enabled destinations found and retaining local copies is disabled.
      • If you do not select the Retain Backups in the Default Backup Directory setting, you will disable WHM’s File and Directory Restoration interface (WHM >> Home >> Backups >> File and Directory Restoration) and hide cPanel’s File and Directory Restoration interface (cPanel >> Home >> Files >> File and Directory Restoration). For more information, read the How to Manage Metadata Settings documentation.
      • This setting does not cause the system to remove system backup files, directories, or other files.
  • Mount Backup Drive as Needed — Select the checkbox to mount a backup drive. This setting requires a separate mount point and causes the Backup Configuration process to check the /etc/fstab file for a backup mount.

    • If a mount exists with the same name as the staging directory, the Backup Configuration process mounts the drive and backs up the information to the mount.

    • The location that you specify in the Default Backup Directory text box must match the mount point in the /etc/fstab file. Otherwise, the backup will fail and the system will log an error similar to the following message:

      You have enabled BACKUPMOUNT in the /var/cpanel/backups/config file, but there is no mount point that matches /mnt/disk/backupMAIN in the /etc/fstab file.
      

      After the backup process finishes, the system dismounts the drive.

Warning:
  • When you select the checkbox, you will disable WHM’s File and Directory Restoration interface (WHM >> Home >> Backups >> File and Directory Restoration) and hide cPanel’s File and Directory Restoration interface (cPanel >> Home >> Files >> File and Directory Restoration). For more information, read the How to Manage Metadata Settings documentation.
  • If you deselect the checkbox, the Backup Configuration process does not check the /etc/fstab file for a mounted backup drive.

Save Configuration

After you configure the desired settings, click Save Configuration at the bottom of the Backup Settings form. To reset all of the settings in the form to the previously saved settings, click Reset.

The Additional Destinations tab

Use the Additional Destinations tab to store your backups in a remote destination. Select a destination type from the menu and click Create New Destination. A form for the selected destination type will appear.

  • After you complete the form, click Save Destination to save your updated destination but not validate your changes.
  • To automatically validate your information after you save your changes, click Save and Validate Destination. The Additional Destinations table will appear.
Warning:

We strongly recommend that you also save your backups to a remote Additional Destinations location. If you do not select the Retain Backups in the Default Backup Directory setting and do not specify a destination in the Additional Destinations section, the system will return the following error:

Error: Nowhere to back up: no enabled destinations found and retaining local copies is disabled.

 

Note:
  • Each additional destination transfer will increase the amount of time that the backup process requires. If the process runs too long, it may interfere with the next backup process.

  • If you use the Incremental backup type, you can only use Rsync additional destinations.

  • To restore backups that exist in the additional destinations that you create, perform a remote restoration. For more information, read our Remote Restoration documentation.

Select one of the tabs below to view information for that destination type.

Warning:

We recommend that you only transfer system backup files over encrypted connections. The following destination types use encrypted connections:

  • Amazon S3™
  • Backblaze B2
  • SFTP
  • Google Drive™
  • WebDAV with the SSL Enabled setting

Select Additional Local Directory to save backup files to another local filesystem.

 
Additional Local Directory
Setting Description
Destination Name Required — Enter a destination name for your backup file. This name appears in your destination table.
Transfer System Backups to this Destination Select this checkbox to transfer system backups to this additional destination. To use this setting, you must also select the Back up System Files checkbox in the Backup Settings tab.
Backup Directory Required — Enter the directory path, relative to the account’s home directory, in which you wish to store backups.
Mount Backup Drive as Needed Select the checkbox to mount a backup drive. This setting requires a separate mount point and causes the Backup Configuration process to check the /etc/fstab file for a backup mount. If a mount exists with the same name as the staging directory, the Backup Configuration process mounts the drive and backs up the information to the mount. After the backup process completes, the system dismounts the drive. If you deselect the checkbox, the Backup Configuration process does not check the /etc/fstab file for a mount.
 
Amazon S3

To use this destination type, you must possess an Amazon S3 account. To create an account, follow the directions in Amazon’s Sign Up for Amazon S3 documentation.

Setting Description
Destination Name Required — Enter a destination name for your backup files. This name appears in your destination table.
Transfer System Backups to this Destination Select this checkbox to transfer system backups to this additional destination. To use this setting, you must also select the Back up System Files checkbox in the Backup Settings tab.
Folder Enter the name of the directory where you wish to store backups.
Bucket Required — Enter the name of a currently-existing bucket in which you wish to store your backup.
Access Key ID Required — Enter the access key ID in this text box. Your server uses the access key to authenticate with the Amazon S3 account. For more information about access keys for Amazon S3, read Amazon’s Managing Access Keys documentation.
Secret Access Key Required — Enter the secret access key in this text box. For more information about secret access keys for Amazon S3, read Amazon’s Managing Access Keys documentation.
Timeout

Was this answer helpful?

Related Articles

Backup Restoration
Overview: This interface restores cPanel accounts from local backups or backups on a remote FTP...
Backup System Migration
Important: The Backup System Migration interface only appears when backups exist under the...
Backup User Selection
Overview: The Backup User Selection interface allows you to exclude user accounts from your...
File and Directory Restoration for WHM
Overview: Important: To use this feature, you must enable account backups in WHM’s Backup...
Restore a Full Backup/cpmove File
Overview: Warning: We removed this interface in cPanel & WHM version 90. Use WHM’s...