Retention Policy

Veeam Plug-in allows you to configure retention policy for Microsoft SQL Server backups. The retention policy helps maintain the life cycle of restore points and make sure that backup files do not consume the entire space on the backup repository.

Veeam Plug-in for Microsoft SQL Server applies the retention policy at the database level and retains restore points for a number of days defined in the backup settings. After each full backup or differential backup session, Veeam Plug-in checks the time when restore points for the backed-up database were created and removes outdated restore points from the backup chain.

Veeam Plug-in does not remove outdated restore points immediately. Instead, Veeam Plug-in applies the retention policy to the inactive part of the backup chain — that is, the previous full backup and its dependent differential and log backups. Only after the last incremental backup in the chain becomes outdated, Veeam Plug-in will remove the inactive backup chain.

For example, the retention policy is set to 7 days. Veeam Plug-in is set to create full backups each Sunday, and differential backups and log backups are created Monday through Saturday. Although a new full backup is created on Sunday, the previous full backup is not deleted. Without the full backup, the functionality of the subsequent chain of differential and log backups will be compromised. Veeam Plug-in will wait for the time when the last restore point in the inactive backup chain becomes outdated, and only then will delete the entire inactive chain, which will happen next Saturday.

Retention Policy Backup Chain

Retention Policy Configuration

To configure the retention policy, select the Apply retention policy check box at the Options step of the Back Up Database wizard and specify the number of days to keep restore points in the backup chain.

In contrast to retention policy for image-level backups in Veeam Backup & Replication, retention policy for backups created with Veeam Plug-in for Microsoft SQL Server is optional. This allows you to easier configure retention policy for different types of Microsoft SQL Server backups.

For example, you want to configure backup settings to create full, differential and log backups for the same database. In this case, you can enable retention policy in the backup settings for full backups only. Differential backups and log backups that depend on the full backup will be processed according to the retention policy specified for the full backup.

Alternatively, if you enable retention policy for multiple types of backups of the same database, you must specify the same number of days to keep restore points in the backup chain for each backup type. Otherwise, Veeam Plug-in will keep restore points according to the lowest number. For example, you set Veeam Plug-in to keep full backups for 7 days and differential backups for 3 days. In this case, Veeam Plug-in will remove inactive backup chains whose restore points are older than 3 days.

If you do not specify the retention policy for any type of Microsoft SQL Server backup, Veeam Plug-in will not remove outdated restore points, and backup files fill remain in the backup repository.

You can also manually delete Veeam Plug-in backups from a backup repository using the Veeam Backup & Replication console. For details, see: Deleting Backup.