Hosting Question? Find the Solution -

KNOWNHOST KNOWLEDGE BASE

Browse our Guides, Articles, and How-To's

How to setup backups for WHM?

Category: cPanel
Tags: # # # #

Backups are necessary for your business with valuable data. Everything is dependent on the data in the online world, and you should consider configuring secure backups for your server. If you have a cPanel/WHM server, then this article guides you through how to set up backups for WHM?


First, login into the WHM panel,

https://your-domain.com:2087 or https://IP-address: 2087 or https://server-hostname: 2087.

login-to-whm-panel

Navigate to BackupBackup Configuration.

navigate to backup configuration

The backup configuration has two major sections to configure the automatic backups,

  • Backup Settings.
  • Additional Destinations.
backup configuration wizard options

To enable the backup, check the option Enable Backups.

enable the whm backup cpanel

Local Backup Settings

Once you enable the backups, you have a whole list of configurable options; let’s look at that one by one,

Global Setting

Compressed: Save all of your information, use less disk space, but take more time to create a backup. Compressed backups will be stored in the format of .tar.gz.

Uncompressed: Save all of your information, use more disk space, but take less time to complete a backup. It is a sort of backup of the files without any compression.

Incremental: Only save the information that has changed since your last backup. This backup is ideal for having just the latest backups of your accounts.

backup types configuration whm

Check the Available Disk Space: If you enable this option and the available disk space is less than the amount that you specified, the system will not run the backup.

Maximum Destination Backup Timeout: Enter the number of seconds during which the destination backup will attempt to run. If the destination backup attempt is not successful during this time, it will time out and stop.

Maximum Backup Restoration Timeout: Enter the number of seconds during which the system will attempt to run the backup restoration. If the restoration cannot complete in the specified time, it will cancel.

check available space option whm backup

Scheduling and Retention

This is the crucial part of the backup configuration; you can set up the backup scheduling and retention of the available backup on the server/destination using the below-mentioned configurable options.

Here, you have three types of schedule you can configure,

  • Daily Backup.
  • Weekly Backup.
  • Monthly Backup.

To enable the specific backup, just check the option, and you have furthermore configurable options,

backup schedule backup configurtaion

Databases

The backup configuration offers a separate section for the Databases backup, and you can configuration backup using three types,

Per Account Only: Use the “mysqldump” command to create backup files with the “.sql” file extension for each account.

Entire MySQL Directory: Back up all files in the “/var/lib/mysql/” directory.

Per Account and Entire MySQL Directory: Back up all files in the “/var/lib/mysql/” directory, and use the “mysqldump” command to create backup files with the “.sql” extension for each account.

databases backup configuration whm

Configure the Backup Directory

By default, cPanel/WHM offers local backups, and its directory can be configured using the same interface. Also, you can configure the Staging directory for the backup using the same window.

Further more, you have two more configurable options,

Retain Backups in the Default Backup Directory: Retain backups in the default local backup directory, even after the system transfers the backups to another destination. If you disable this option, the system will delete the backups after they move to another destination.

Mount Backup Drive as Needed: Requires a separate drive or other mount point.

configure backup directory whm

Additional Destination

cPanel/WHM widely supports various storage provider vendors by default. Moreover, you can also set up a custom/separate VPS/Storage Box with SSH or FTP for the Backup. That can be configured within the Backup> Additional Destination for offsite backups.

Below is the additional destination you can configure within cPanel/WHM,

  • Amazon S3.
  • Backblaze B2.
  • FTP.
  • Google Drive.
  • Rsync.
  • S3 Compatible.
  • SFTP.
  • WebDAV.
additional destination for the backup in whm

cPanel/WHM initiates automatic backup at 1 AM using configured cron. Many times, customers seek assistance with initiating cPanel/WHM backup manually.

Many users have already asked us, “Is there any way to initiate a backup manually?” Yes, it is possible to initiate the manual backup without waiting for a cron. cPanel/WHM has an independent script to initiate custom backups. To initiate a manual backup, run the following command as root,

/usr/local/cpanel/bin/backup

If the backup job is already completed for the day and still you are looking for an additional copy of a backup; in that scenario, run the following command,

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

To know more and access the manual of the backup script, use the following command,

/usr/local/cpanel/bin/backup --help

Conclusion

Now that we’ve gone over how to change the administrator email address in the softaculous settings. Once you change the administrator email address, you will get all the notifications once softaculous runs the configured cron job.

KnownHost offers 365 days a year, 24 hours a day, all 7 days of the week best in class technical support. A dedicated team ready to help you with requests should you need our assistance. You’re not using KnownHost for the best webhosting experience? Well, why not? Check with our Sales team to see what can KnownHost do for you in improving your webhosting experience.