Backup Configuration

For WHM Version 11.40

(Home >> Backup >> Backup Configuration)

Overview

The Backup Configuration feature is an interface through which system administrators can schedule customized backup configuration.

note Note: While the Backup Configuration feature in 11.38 has been updated, the 11.36 version of this feature is still available, as the Legacy Backup Configuration.

ALERT! Warning:The Legacy Backup Configuration will eventually be removed from WHM in future releases. We strongly recommend that you use only the Backup Configuration feature.

Legacy Backup Configuration

You have the option to use the Legacy Backup Configuration with the Backup Configuration feature. To do so, you need to enable both features.

The title bar at the top of the Backup Configuration screen indicates the status of the Legacy Backup Configuration.

  1. To change the status of the Legacy Backup Configuration, click Click here in the title bar that states the status of the Legacy Backup Configuration.
  2. Choose Enable or Disable the Backup Status.
  3. Make your desired adjustments.
  4. Click Save.

You will be brought back to the Backup Configuration screen so you can customize this feature.

Global Settings

These options allow you to configure your backup settings.

Backup Status

  • Enable this option to run the updated Backup Configuration feature.
  • By default, this feature is enabled, and you can customize the types of backup.
  • If you disable this option, you will not run the updated Backup Configuration feature. Additionally, you will not be able to customize the types of backup.

Backup Type

This option allows you to decide how your backups are stored.

Backup Type Description
Compressed Select this option to save all of your information in a compressed format. It uses less disk space than the Uncompressed option, but takes more time to complete.
Uncompressed Select this option to save all of your information. This option is faster than the Compressed option, but it uses more disk space.
Incremental Select this option to use incremental backups.
  • The incremental backup type only keeps 1 backup. Updated account information is saved to the existing backup. Files replaced with the updated information are removed from the backup.
  • This option creates uncompressed backups.
  • The only restoration available will be the last backup.
  • ALERT! Warning: You cannot restore the account to a time before your last backup.
  • Incremental backups limit your restoration options, but run faster and use less disk space.

Maximum destination timeout in seconds — Enter the number of seconds to allow a backup to upload a backup file or restore a backup file.

Scheduling and Retention

These options allow you to specify when the backup process runs. You may choose to run backups on a daily or monthly basis. Select the box next to the timing setting of your choice.

Backup Daily

  1. Select the days of the week that you want to run backups. You may select more than one day.
  2. Enter the number of daily backups to keep in the Retain daily backups field. This may be any number between 1 and 9999.

note Note: To run a weekly backup, select one day.

Backup Monthly

  1. You may back up your account(s) on the 1st or the 15th of each month. You may also select both dates.
  2. Enter the number of monthly backups to keep in the Retain monthly backups field. You may choose any number between 1 and 9999.

note Note: If you run daily and monthly backups on the same day, the daily backup will run first, and then the monthly backup will copy the daily backup.

note Note: You must select at least one backup timing setting.

Files

These options allow you to configure the information that you want to backup.

Backup Accounts

Select this option to back up the user files in the /home directory. After you select this option, you can specify what kind of data to include in the backup.

Select Users

Click Select Users to open the Backup User Selection feature in WHM. This feature allows you to decide which users will use the Legacy Backup feature and which users will use the Backup Configuration feature.

For more information, read our Backup User Selection documentation.

Backup Suspended Accounts

  • Select Disable if you do not want to back up suspended accounts.
    • If an account has been turned On in the Backup User Selection screen, but the account is suspended, that account will not be backed up.
  • Select Enable to back up all suspended accounts.

Backup Access Logs

  • Select Disable if you do not want to back up the access logs.
  • Select Enable to back up access logs and keep the information from usr/local/cpanel/domlogs

Backup Bandwidth Data

  • Select Disable if you do not want to back up the bandwidth data.
  • Select Enable to back up bandwidth data. This data is in numerical format.

Use Local DNS

  • Select Disable to backup DNS information from the DNS cluster.
  • Select Enable to backup DNS information from the server for the domain.

Backup System Files

  • Select this option to back up the system files. Many of these files are in the /etc directory.
  • note Note: This option is not needed for account restoration, but it is needed for server restoration. We strongly recommend that you enable this option.
  • For more information, read our system backup documentation.

ALERT! Warning: You must select either Backup Accounts or Backup System Files in order to run backups.

Databases

The following options allow you to decide how to back up SQL databases:

Per Account Only Select this option to back up all databases per account via mysqldump
Entire MySQL Directory Select this option to back up all databases on the server. This will back up /var/lib/mysql/
Per Account and Entire MySQL Directory Select this option to do a comprehensive backup that copies all databases in each individual account, as well as all databases on the server.

Configure Backup Directory

These options allow you to specify where to save your backups.

note Note: We strongly recommend that you save your backups to a remote location in addition to a local destination.

Default Backup Directory

By default, backups save to a local destination (/backup). To change the default backup directory, enter the absolute path to your desired directory location in the Default Backup Directory field.

Retain backups in the default backup directory

Select the Retain backups in the default backup directory option to keep account backups in the default local backup directory, even after the backups have been transferred to another destination.

  • If this option is not selected, any account backup files will be deleted from the local destination after they have been successfully transferred to at least one of your additional destinations. System backup files, directories, and any other files are not removed.

ALERT! Warning: Backups will not be saved unless you select either Retain backups in the default backup directory or define a destination in Additional Destinations.

Mount Backup Drive as Needed

Select this option to mount a backup drive.

If the Mount Backup Drive as Needed feature is enabled, the Backup Configuration process will look at /etc/fstab for a backup mount. If a mount is there with the same name as the staging directory, the Backup Configuration process will mount the drive and backup the information to the mount. After the backup is complete, the drive will be dismounted. If the feature is disabled, then the Backup Configuration process will not look in the /etc/fstab file for a mount.

note Note: When this feature is enabled, it requires a separate mount point.

Additional Destinations

You have the option to save your backups to additional destinations. Each additional destination may increase the length of time it takes for the backup process to complete. If the process takes too long, it may interfere with the next backup process.

note Note: To restore backups stored in the Additional Destinations that you create, you must do a remote restoration.

PICK Remember: If you use the Incremental backup type, you cannot add Additional Destinations.

Destination Type

Select a destination type. You may select from FTP, Additional Local Directory, SFTP, WebDAV, or Custom destination types. After you select your desired destination type, click Create new destination.

FTP

Field Description
Destination Name Provide a destination name for your backup. This name will appear in your destination table.
Backup Directory This field is optional and specifies the directory path where backups are stored.
Remote Host Provide the hostname or IP address of the remote server.
note Note: The address should not include http://, https://, a trailing port, or path information. No local hosts or loopback addresses are allowed.
Port The port used to communicate with the remote server. By default, FTP destinations use port 21.
Remote Account Username The username of the account on the remote server.
Remote Password The password of the account on the remote server. The password is not visible for security reasons. Unless a new password is specified, the existing password will be used.
Timeout The maximum amount of time to wait for a response from the remote server before errors are received. This is valued in seconds. This number must be between 30 and 300. If the server does not respond in this time frame, 2 more attempts to contact the server will be made. If the server does not respond after those attempts, nothing will be saved to this destination.
Passive FTP Select whether Passive FTP will be used. FTP servers behind NAT firewalls require the passive option to be enabled.

If you want to save your updated destination but you do not want to validate your changes, click Save Destination.

To automatically validate your information after you save your changes, click Save and Validate Destination.

Additional Local Directory

Field Description
Destination Name Provide a destination name for your backup. This name will appear in your destination table.
Backup Directory This field is optional and specifies the directory path to where backups are stored.

You also have the option to disable or enable a mount of the backup drive. This feature requires a separate mount point.

If you want to save your updated destination but you do not want to validate your changes, click Save Destination.

To automatically validate your information after you save your changes, click Save and Validate Destination.

SFTP

Field Description
Destination Name Provide a destination name for your backup. This name will appear in your destination table.
Backup Directory This field is optional and specifies the directory path to where backups are stored.
Remote Host Provide the hostname or IP address of the remote server.
note Note: The address should not include http://, https://, a trailing port, or path information. No local hosts or loopback addresses are allowed.
Port The port used to communicate with the remote server. By default, SFTP destinations use port 22.
Remote Account Username The username of the account on the remote server.
Authentication Type You may choose how to authenticate your destination. You may choose to use a Key Authentication or a Password Authentication.
Key Authentication Options The full path of the private key on this server in the Private Key field. Enter the passphrase for this server in the Passphrase field.
Password Authentication Options The password of the account on the remote server in the Remote Password field. The existing password is not visible for security reasons. Unless a new password is specified the existing password will be used.
Timeout The maximum amount of time to wait for a response from the remote server before errors are received. This is valued in seconds. This number must be between 30 and 300. If the server does not respond in this time frame, 2 more attempts to contact the server will be made. If the server does not respond after those attempts, nothing will be saved to this destination.

If you want to save your updated destination but you do not want to validate your changes, click Save Destination.

To automatically validate your information after you save your changes, click Save and Validate Destination.

WebDAV

Field Description
Destination Name Provide a destination name for your backup. This name will appear in your destination table.
Backup Directory This field is optional and specifies the directory path to where backups are stored.
Remote Host Provide the hostname or IP address of the remote server.
note Note: The address should not include http://, https://, a trailing port, or path information. No local hosts or loopback addresses are allowed.
Port The port used to communicate with the remote server. By default, WebDAV destinations use port 80. A secure port is 443. cPanel uses port 2077 for non SSL and port 2078 for SSL.
SSL Enabled A WebDAV destination requires SSL encryption to be enabled.
Remote Account Username The username of the account on the remote server.
Remote Password The password of the account on the remote server. The password is not visible for security reasons. Unless a new password is specified, the existing password will be used.
Timeout The maximum amount of time to wait for a response from the remote server before errors are received. This is valued in seconds. This number must be between 30 and 300. If the server does not respond in this time frame, 2 more attempts to contact the server will be made. If the server does not respond after those attempts, nothing will be saved to this destination.

If you want to save your updated destination but you do not want to validate your changes, click Save Destination.

To automatically validate your information after you save your changes, click Save and Validate Destination.

Custom

Field Description
Destination Name Provide a destination name for your backup. This name will appear in your destination table.
Script Enter your custom transport here. This is the path to a script you provide which implements the transport. For more information about how to create and implement a script, see our documentation for how to create a custom destination.
Backup Directory This field is optional and specifies the directory path to where backups are stored.
Remote Host Provide the hostname or IP address of the remote server.
note Note: The address should not include http://, https://, a trailing port, or path information. No local hosts or loopback addresses are allowed. This is optional.
Remote Account Username The username of the account on the remote server. This is optional.
Remote Password The password of the account on the remote server. The password is not visible for security reasons. Unless a new password is specified, the existing password will be used. This is optional.
Timeout The maximum amount of time to wait for a response from the remote server before errors are received. This is valued in seconds. This number must be between 30 and 300. If the server does not respond in this time frame, 2 more attempts to contact the server will be made. If the server does not respond after those attempts, nothing will be saved to this destination.

Validate All Destinations

Click this button to validate your Additional Destinations.

  • If your Additional Destination functions properly, you will receive a success message.
  • If your Additional Destination does not function properly, you will receive an error message.

Save Configuration

After you set all options to your satisfaction, click Save Configuration at the bottom of the Backup Configuration page.

To reset all options in the Backup Configuration to the default, click Reset at the bottom of the Backup Configuration page.

How to Run Backups Manually

To run a backup manually, run the following command:

/usr/local/cpanel/bin/backup

If the backup is up-to-date, and you want to run backups anyway, run:

/usr/local/cpanel/bin/backup --force

To use a custom script:

  1. Copy the /usr/local/cpanel/scripts/pkgacct file, and modify it accordingly.
  2. Place the newly modified pkgacct file in the /var/cpanel/lib/Whostmgr/Pkgacct/pkgacct directory.
  3. Run the /usr/local/cpanel/bin/backup command with the --allow-override flag.

Additional Documentation

  • Restoration — How to restore your backup with the Backup Restoration feature of WHM.
  • Remote Restoration — How to restore backups stored in the Additional Destinations that you created using the Backup Configuration feature.
  • System Backups — How to upload system backups to your chosen backup destinations.

Topic revision: r14 - 19 Sep 2013 - 18:14:40 - Main.StacyWyatt