Account Backup

 

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:
    • % — Percent of available disk space.
    • 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.
    Note:

    The Per Account Only setting will only create backups when the Back up User Accounts setting is enabled and only for users enabled in Backup User Selection (WHM » Home » Backup » Backup User Selection). To back up MySQL without backing up cPanel accounts, select the Entire MySQL Directory setting instead.

  • 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. The system attempts to back up the MySQL directory without stopping MySQL, which may cause InnoDB issues in the backup file. You cannot restore backup files with InnoDB issues.
  • You cannot restore the Entire MySQL Directory backup files through the cPanel & WHM interface. The system administrator must restore these files manually.

Configure the 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:
    • You cannot use the following paths:
    1
    2
    3
    4
    5
    6
    7
    
    /etc
    /dev
    /sys
    /proc
    /run
    /boot
      
    • You cannot use the following paths, but you can use a subdirectory within these paths:
    1
    2
    3
    4
    
    /
    /home
    /var
    /usr
    • You cannot use any front slash characters (\) in the path.
    • You cannot use any path which contains two consecutive periods (..).
    • 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™
  • Rsync
  • WebDAV with the SSL Enabled setting

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

Was this answer helpful?

 Print this Article

Also Read

Modify Account

Overview The Modify an Account interface allows you to make changes to an existing account. WHM...

Account Creation Errors

Account Restore

The Account Restore interface displays the status and progress of your account restoration, and...