cPanel

Backup Retention Behavior

Valid for versions 82 through the latest version

Version:

82


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 (WHM >> Home >> Backup >> Backup Configuration). 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 WHM’s Backup Configuration interface (WHM >> Home >> Backup >> Backup Configuration).

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 (WHM >> Home >> Backup >> Backup Configuration). 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 (WHM >> Home >> Backup >> Backup Configuration).

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.

Standard backup retention behavior

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


After the system successfully completes the next backup (5), it deletes the oldest backup (1):


After the next backup fails (6F), the system does not delete the oldest backup (2):


If several more backups fail (7F, 8F, and 9F), the system will continue to retain the oldest backups:


After the next complete backup succeeds (10), the system deletes the oldest backups so that it only retains four backups:


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.

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


After the system successfully completes the next backup (5), it deletes the oldest backup (1):


After the system generates a partial backup (6F), it deletes the oldest backup:


After several more partial backups (7F and 8F), the system only retains partial backups:


After the next partial backup (9F), the system must retain the last successful backup (5), so it deletes the oldest partial backup in order to retain only four backup files:


After the next complete backup completes (10), the system can delete the oldest backup (5) so that it only retains four backups, with at least one successful backup.


Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *