The Backup Configuration interface allows system administrators to customize their scheduled backups.
Warning:
We strongly recommend that you only use the Backup Configuration interface to configure backups of your server. We plan to remove the Legacy Backup Configuration interface (Home >> Backup >> Legacy Backup Configuration) from WHM in a future release.
Note:
The system applies the current Backup Configuration settings to accounts that you create or transfer.
To enable and run backups, you must complete both of the following steps:
- Select Enable for the Backup Status setting in this interface's Global Settings section.
- Select your desired settings for the Backup Configuration feature.
-
Use the Backup User Selection interface (Home >> Backup >> Backup User Selection) to enable backups for each desired cPanel user.
Note:
To enable or disable the Backup Configuration feature for all users, select the checkbox in the top right corner of the Backup User Selection interface.
Global Settings
You can configure the following global backup settings:
Setting
|
Description
|
---|---|
Backup Status |
Enable this setting to run the updated Backup Configuration feature. This setting defaults to Enable. |
Backup Type |
Choose one of the following options to determine how the system stores backup files:
|
Maximum destination timeout in seconds |
Enter the maximum number of seconds to allow a backup process to upload a single backup file or restore a single backup file. Note:
|
Scheduling and Retention
The Scheduling and Retention settings allow you to specify when the backup process runs. You may choose 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.
Note:
You must select at least one of the following settings.
Setting
|
Description
|
---|---|
Backup Daily |
Your system creates a new backup on each of the days of the week that you select. When you select this setting, you must also configure the following settings:
|
Backup Weekly |
Your system creates a new backup once each week, on the day that you select. When you select this setting, you must also configure the following settings:
|
Backup Monthly |
Your system creates a new backup either once or twice per week, on the days of the month that you select. When you select this setting, youmust also configure the following settings:
Note: If you run daily and monthly backups on the same day, the daily backup runs first, and then the monthly backup copies the daily backup. |
Files
The Files settings allow you to configure the information that you wish to back up. Select the checkboxes that correspond to the settings that you wish to use.
Warning:
You must select either the Backup Accounts or Backup System Files checkbox in order to run backups.
Setting
|
Description
|
---|---|
Backup Accounts |
Back up the user files in each cPanel user's home directory. Note: Click Select Users to open the Backup User Selection interface (Home >> Backup >> Backup User Selection). After you select this setting, select the type of data to include in the backup file:
|
Backup System Files |
Back up your server's system files. Notes:
|
Databases
Select one of the following options for the Backup SQL Databases setting, to determine how to back up SQL databases:
Setting
|
Description
|
---|---|
Per Account Only | Only back up the databases for each account. This setting uses the mysqldump utility. |
Entire MySQL Directory | Back up all of the databases on the server. This backs up the entire /var/lib/mysql/ directory. |
Per Account and Entire MySQL Directory | Perform a comprehensive backup that copies all of the databases for each individual account, as well as all of the databases on the server. |
Configure Backup Directory
The following settings allow you to specify where you wish to save your backups.
Warning:
- We strongly recommend that you save your backups to a remote location in addition to a local destination.
- If you do not select the Retain backups in the default backup directory setting and do not specify a destination in the Additional Destinationssetting, the system will return the following error:
Error: Nowhere to back up: no enabled destinations found and retaining local copies is disabled.
- The backup process and the transfer process use separate queues. If each backup finishes much faster than each transfer, backup files can accumulate on the server and fill the hard drive.
- Perform backups to NFS mount points at your own risk. If you choose a NFS mount point, you risk data loss if there is a network interruption or if you did not properly configure NFS.
- To prevent performance degradation, the system automatically disables quotas on non-root filesystems that contain a backup destination.
Setting
|
Description
|
---|---|
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 |
Retain backups in the default backup directory. |
Select this checkbox to retain each account backup in the If you do not select this setting, your server deletes account backup files from the
Note: This setting does not cause the system to remove system backup files, directories, or other files. |
Mount Backup Drive as Needed. |
Select the Enable button to mount a backup drive. This setting requires a separate mount point and causes the Backup Configuration process to check the
If you select the Disable button, the Backup Configuration process does not check the |
Additional Destinations
You can save your backups to additional destinations. Each additional destination may increase the amount of time that the backup process requires. If the process runs too long, it may interfere with the next backup process.
Notes:
- To restore backups that exist in the additional destinations that you create, perform a remote restoration. For more information, read our Remote Restoration documentation.
- If you use the Incremental backup type, you cannot add additional destinations.
- To save your updated destination but not validate your changes, click Save Destination.
- To automatically validate your information after you save your changes, click Save and Validate Destination.
Select a destination type from the menu and click Create new destination. A new section for the selected destination type will appear.
Warning:
Only transfer system backup files over encrypted connections. The following destination types use encrypted connections:
- Amazon S3™
- SFTP
- WebDAV with SSL Enabled
The Additional Local Directory type does not transfer your data from the server, so that method is secure.
Select a tab to view information for that destination type:
Setting
|
Description
|
---|---|
Destination Name | Enter a destination name for your backup files. This name appears in your destination table. |
Transfer System Backups to Destination |
Select this checkbox to transfer system backups to an additional destination. Warning: Only transfer system backup files over encrypted connections. |
Folder |
Enter the name of the folder in which you wish to store your backups. Make certain that the folder is in the bucket that you enter in the Bucket text box. Note: This setting is optional. |
Bucket |
Enter the name of the bucket in which you wish to store your backup. Note: A bucket is the container in which your Amazon S3 folders and files reside. You must create your bucket in the Amazon S3 management console.
|
Access Key ID | After you generate an access key, enter the access key ID in this text box. Your server uses the access key to authenticate with the Amazon S3 account. |
Secret Access Key | After you generate an access key, enter the secret access key in this text box. Unless you specify a new password, the server uses the existing password. |
Timeout | Enter the maximum amount of time in seconds that you want the server to wait for a response from the remote server before it generates errors.
|
Save Configuration
After you configure the desired settings, click Save Configuration at the bottom of the Backup Configuration interface.
To reset all of the settings in the Backup Configuration interface to the default settings, click Reset.
Run backups manually
To run a backup manually, run the following command:
/usr/local/cpanel/bin/backup |
If the backup is up-to-date but you still wish to perform a backup, run the following command:
/usr/local/cpanel/bin/backup --force |
To use a custom packaging script, perform the following steps:
- Copy the
/usr/local/cpanel/scripts/pkgacct
file and modify it. - Store the modified
pkgacct
file in the/var/cpanel/lib/Whostmgr/Pkgacct/pkgacct
directory. - Run the
/usr/local/cpanel/bin/backup
command with the--allow-override
flag.