Backup Retention Behavior in cPanel & WHM

This article explains how cPanel & WHM handles backup retention, including the difference between the default retention mode and the strictly‑enforced retention mode. It also describes how the system behaves when backups succeed or fail, and how retention limits are applied.

cPanel backup retentionstrictly enforced retentionWHM backup configuration

~3 min read • Updated Feb 15, 2026

Backup Retention Behavior


Valid for versions 82 through the latest version


Version: 82
Last modified: June 9, 2025


Overview


This document explains the retention behavior of the cPanel & WHM backup system. You can configure this behavior in WHM’s Backup Configuration interface:


WHM » Home » Backup » Backup Configuration


How backup retention works


The system offers two retention modes:

  • Default backup retention behavior
  • Strictly-enforced retention

Both modes ensure that the system retains the number of successful backups you specify in WHM. However, the default behavior keeps both successful and failed backups until the next successful backup completes. This means the system may temporarily retain more backups than the configured limit.


With strictly-enforced retention, the system keeps at least one successful backup but deletes any backups that exceed the configured retention limit—even if some backups failed. Because this mode never exceeds the retention limit, it is recommended for servers with limited storage.


To enable strictly-enforced retention, select:

Strictly enforce retention, regardless of backup success


You can also configure notifications for successful or failed backups. For details, refer to the Contact Manager documentation.


Default backup retention behavior


When a backup completes successfully, the system deletes the oldest backup. If a system-generated backup fails:

  • The failed backup is kept
  • The oldest backup is not deleted
  • The system continues retaining older backups

This ensures that at least one successful backup is always available.


After the next successful backup, the system deletes older backups to return to the configured retention count.


Standard backup retention behavior


If you run daily backups and retain four of them, the system keeps the latest four backup files.


  • After a successful backup: the oldest backup is deleted.
  • If the next backup fails: the oldest backup is not deleted.
  • If several backups fail: older backups continue to accumulate.
  • After the next successful backup: the system deletes excess backups to return to four.

Backup retention behavior with Strictly Enforce Retention


With strictly-enforced retention enabled:

  • After any backup (successful or failed), the oldest backup is deleted.
  • If a backup fails, the system keeps the failed backup but still deletes the oldest backup.
  • The system never exceeds the configured retention limit.
  • The system always retains at least one successful backup.

Example with four retained backups:

  • Four latest backups are kept.
  • After a successful backup: the oldest backup is deleted.
  • After a partial/failed backup: the oldest backup is deleted.
  • If several partial backups occur: only partial backups remain.
  • The system must retain the last successful backup, so it deletes the oldest partial backup to maintain four total backups.
  • After the next successful backup: the system deletes the oldest backup and maintains four backups, including at least one successful backup.

Conclusion


The backup retention system in cPanel & WHM is flexible and can be configured based on your storage needs. If your server has limited space, strictly-enforced retention is the recommended option. Otherwise, the default behavior may temporarily retain additional backups until the next successful backup completes.


Written & researched by Dr. Shahin Siami