Overview

This document clarifies the retention behavior of the cPanel & WHM backup system. You can configure these settings within WHM’s Backup Configuration interface (WHM » Home » Backup » Backup Configuration).

How Backup Retention Works

The backup system in cPanel & WHM offers two distinct retention modes: the default behavior and strictly-enforced retention. Both modes ensure that the system maintains the specified number of successful backups, as configured in WHM’s Backup Configuration interface (WHM » Home » Backup » Backup Configuration).

However, the default backup retention behavior will keep the set number of successful backups, along with any failed backups, until the next successful backup is completed. This means that the total number of retained backups might temporarily exceed the limit you have defined in WHM’s Backup Configuration interface (WHM » Home » Backup » Backup Configuration).

In contrast, strictly-enforced retention maintains at least one successful backup but deletes any backups that surpass the configured retention limit, even if they are failed backups. We recommend enabling strictly-enforced retention if your server has limited storage space, as it ensures the system will not exceed the set retention limit. To enable this feature, select the Strictly enforce retention, regardless of backup success setting in WHM’s Backup Configuration interface (WHM » Home » Backup » Backup Configuration).

You can also customize notifications for backup success or failure. For details on configuring backup notifications, please refer to the Contact Manager documentation.

Default Backup Retention Behavior

When cPanel & WHM successfully completes a backup, the system deletes the oldest existing backup. If a system-generated backup fails, the system will retain the failed backup and will not delete the oldest existing backup. This behavior ensures that at least one successfully completed backup is always preserved.

Once the subsequent backup successfully completes, the system will then delete the oldest backups as needed to return to the desired number of retained backups.

Example: Standard Backup Retention

Consider a scenario where you run daily backups and configure the system to retain four backups. The system will initially keep the four latest successful backup files.

  • After the next backup successfully completes, the system deletes the oldest backup.
  • If the next backup fails, the system does not delete the oldest backup.
  • If several subsequent backups also fail, the system will continue to retain the existing oldest successful backups along with the new failed ones.
  • Once the next complete backup succeeds, the system deletes the oldest backups to ensure only four backups (including the new successful one) are retained.

Strictly Enforced Retention Behavior

With strictly-enforced retention, cPanel & WHM deletes the oldest backup immediately when a new backup completes, regardless of success. If a system-generated backup fails, the system will still keep the failed backup but will also delete the oldest existing backup, ensuring the retention limit is maintained. The system will not continue to retain an unlimited number of oldest backups, except for ensuring at least one successful backup is present if available. This behavior ensures that the system always adheres to the retention limit and keeps at least one successful backup if possible.

After a new backup (successful or failed) completes, the system will delete the oldest backups to return to the desired number of backups, strictly adhering to the limit.

Example: Strictly Enforced Retention

If you run daily backups and configure the system to retain four backups, the system will strictly maintain a maximum of four backup files.

  • After a successful backup completes, the system deletes the oldest backup to maintain the count of four.
  • If a partial (failed) backup is generated, the system still deletes the oldest backup to adhere to the four-backup limit.
  • Even if multiple partial backups occur consecutively, the system will continue to delete the oldest backup, ensuring the total count never exceeds four.
  • Crucially, the system is designed to always retain at least one successful backup if one exists within the retention window. If maintaining the four-backup limit would otherwise lead to retaining only partial backups when a successful one is available, the system will prioritize keeping the last successful backup by deleting an older partial backup.
  • After a new complete backup succeeds, the system will again delete the oldest backup (which might be a partial or an older successful one, depending on the sequence) to ensure exactly four backups are retained, with at least one guaranteed to be successful.
War diese Antwort hilfreich? 0 Benutzer fanden dies hilfreich (0 Stimmen)