This article explains about Backup Configuration in WHM/cPanel how to set and enable.
Regular server backup Configuration in WHM is important for protecting your server from data loss. You may sometimes need a data restore option for your site if you face file deletion or malware infection. Hence for better maintenance of the site, you need a properly configured backup.
cPanel/WHM offers automatic backup configuration methods. For this, you can navigate to the Backup configuration menu from WHM for scheduling auto server backup configuration to all the files and databases. With this article, we are discussing various backup configuration methods focusing on Cpanel backups.
Step 1: Access Backup Configuration in WHM
The WHM backup configuration manager provides an interface to schedule the backup. You can navigate to this interface by following:
- Log in to WHM: Go to your server’s WHM login page and log in as root.
- Navigate to Backup Configuration: In WHM, go to Home > Backup > Backup Configuration.
Step 2: Configure Backup Options
Enable Backups:
Toggle the Enable Backups switch to enable backups on the server.
Backup Type:
Choose between Compressed, Uncompressed, and Incremental backups.
Compressed: Saves disk space by compressing backup files but requires more processing power.
Uncompressed: Takes more space but is faster and easier to restore.
Incremental: Only backs up files that have changed since the last backup, saving time and space.
Backup Retention:
Set how many daily, weekly, and monthly backups to keep. Consider your storage space when setting retention.
Files:
Select what you want to back up: system files, databases, user account files, etc.
You can also select to back up specific users by using the Select Users option.
Step 3: Configure Backup Schedule
Backup Daily, Weekly, and Monthly:
Choose the days and times for each type of backup. Make sure to schedule backups during low-traffic periods to avoid server load issues.
Backup Storage Location:
Local: Saves backups on the server itself (make sure you have sufficient storage).
Remote: Use remote storage options, such as FTP, SFTP, Amazon S3, or Google Drive.
Setup Remote Destination:
Click on Additional Destinations.
Select your preferred remote storage option and fill in the necessary connection details (username, password, API keys, etc.).
Test the connection to ensure the server can communicate with the backup location.
Step 4: Configure Additional Options
Retain Backups in the Default Backup Directory:
Enable this option if you want to retain a local copy of backups even when using a remote destination.
Mount Backup Drive as Needed:
If you have a separate drive for backups, WHM can mount and unmount it as required.
Database Backups:
Choose between Per Account and Entire MySQL Directory, Per Account Only, or Entire MySQL Directory Only.
Per Account backups are useful for easy restoration on a per-user basis.
Account Restoration:
Enable this option if you want to allow restoration of individual accounts.
Step 5: Save Configuration and Start the Backup Process
Save: After configuring all settings, click Save Configuration at the bottom of the page.
Initiate a Manual Backup (Optional): To create a backup immediately, go to Backup > Backup Now in WHM.
Step 6: Verify Backups
After the backup completes, check the backup directory or remote location to ensure backups are being saved correctly. Additionally, attempt a test restoration on a non-critical account to verify backup integrity and restore functionality.
This configuration provides a robust, scheduled backup system on WHM/cPanel, ensuring your data is safe and accessible.