Overview
This document explains the retention behavior of cPanel & WHM's backup system. You can edit this behavior in WHM's Backup Configuration interface (WHM >> Home >> Backup >> Backup Configuration).
How backup retention works
The system has two retention modes: the default backup retention behavior and strictly-enforced retention. Both behaviors ensure that the system saves the amount of successful backups that you set in WHM's Backup Configuration interface. However, the default backup retention behavior will retain that number of successful backups, along with failed backups, until the next successful backup completes. This means that the system could retain a number of backups larger than the amount that you set in the Backup Configuration interface.
When the strictly-enforced retention behavior encounters failed backups, it keeps at least one successful backup, but deletes any backups that surpass the retention limit that you set in WHM's Backup Configuration interface. Because the system will not surpass the retention limit, we recommend that you enable strictly-enforced retention if you have limited space on your server. To enable strictly-enforced retention, select the Strictly enforce retention, regardless of backup success setting in WHM's Backup Configuration interface.
You can customize whether the system will notify you when a backup succeeds or fails. For more information on how to set up your backup notifications, read our Contact Manager documentation.
Default backup retention behavior
When cPanel & WHM completes a backup, the system deletes the oldest backup. When the system-generated backup fails, the system will keep the failed backup, it will not delete the oldest backup, and will continue to retain the oldest backups. This behavior ensures that the system keeps at least one successfully-completed backup.
After the next backup successfully completes, the system will delete the oldest backups to return to the desired number of backups.
Click below to see an example of how the default backup retention behavior works.
Backup retention behavior with the Strictly enforce retention setting
With strictly-enforced retention, cPanel & WHM will delete the oldest backup when the system completes a backup. However, when the system-generated backup fails, the system will keep the failed backup and delete the oldest backup. Also, it will not continue to retain the oldest backup, except for the last successful backup. This behavior ensures that the system keeps at least one successful backup.
After the next backup succeeds, the system will delete the oldest backups to return to the desired number of backups.
Click below to see an example of how the strictly-enforced backup retention behavior works.
Additional documentation