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

  1. Log in to WHM as root.
  2. Navigate to Backup Configuration (Home > Backup > Backup Configuration).
  3. 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:

  1. Click Add Destination and select Amazon S3.
  2. Enter your S3 credentials, bucket name, and directory.
  3. Click Save and Validate Destination.

2. Automating Backups in cPanel

If using cPanel for individual accounts:

  1. Access Backup Settings

    • Log in to cPanel.
    • Navigate to Files > Backup.
  2. Enable Partial or Full Backups

    • Use Partial Backup for specific files or databases.
    • Select Download a Full Account Backup to save the entire account.
  3. Schedule Cron Jobs for Backups
    Automate backups with a cron job to create periodic backups:

    bash
     
    0 2 * * * /usr/local/cpanel/scripts/pkgacct [username] /backup_directory

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

  1. In WHM, go to Backup Restoration.
  2. 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

  1. Test Restorations Periodically: Ensure backups are functional by performing test restores.
  2. Use Redundant Storage: Store backups on multiple remote destinations for added security.
  3. Monitor Disk Usage: Regularly check storage capacity to prevent backup failures.
  4. 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.

 

آیا این پاسخ به شما کمک کرد؟ 0 کاربر این را مفید یافتند (0 نظرات)