Automated backups are crucial for safeguarding your clients' data and ensuring quick recovery in case of a failure. WHM and cPanel offer robust backup automation tools to streamline the process.
1. Configuring Backups in WHM
a) Enable Backup Service
- Log in to WHM as root.
- Navigate to Backup Configuration (
Home
>Backup
>Backup Configuration
). - Enable backups by checking the Enable Backups box.
b) Choose a Backup Type
- Compressed: Saves disk space but may increase backup time.
- Uncompressed: Faster backups but requires more storage.
- Incremental: Only changes since the last backup are saved.
c) Configure Backup Retention
Set the number of daily, weekly, and monthly backups to retain.
d) Backup Destinations
- Local Backup Directory: Saves backups on the same server.
- Remote Destination: Configure backups to external storage, such as an FTP server, Amazon S3, or Google Drive.
Example for S3 Destination:
- Click Add Destination and select Amazon S3.
- Enter your S3 credentials, bucket name, and directory.
- Click Save and Validate Destination.
2. Automating Backups in cPanel
If using cPanel for individual accounts:
-
Access Backup Settings
- Log in to cPanel.
- Navigate to Files > Backup.
-
Enable Partial or Full Backups
- Use Partial Backup for specific files or databases.
- Select Download a Full Account Backup to save the entire account.
-
Schedule Cron Jobs for Backups
Automate backups with a cron job to create periodic backups:
3. Monitoring and Restoring Backups
a) View Backup Logs in WHM
Navigate to Backup Restoration to view recent backup statuses.
b) Restoring a Full Account Backup
- In WHM, go to Backup Restoration.
- Select the account and backup date to restore.
c) Partial Restorations in cPanel
Use the Backup Wizard in cPanel to restore individual files or databases.
Best Practices for Automated Backups
- Test Restorations Periodically: Ensure backups are functional by performing test restores.
- Use Redundant Storage: Store backups on multiple remote destinations for added security.
- Monitor Disk Usage: Regularly check storage capacity to prevent backup failures.
- Encrypt Remote Backups: Protect data with encryption tools before uploading to remote storage.
Common Issues and Troubleshooting
- Insufficient Disk Space: Free up space or switch to a remote backup location.
- Backup Failures: Check
/usr/local/cpanel/logs/error_log
for details. - Remote Validation Errors: Recheck credentials and permissions for the remote destination.
Need Assistance?
If you experience issues configuring automated backups, our experts at Cybrohosting can help. Open a ticket in your Client Area or email us at support@cybrohosting.com.