Help Center
Choose product document...
Veeam Backup & Replication 9.5 Update 4
User Guide for Microsoft Hyper-V

Retention Policy for Deleted Items

In some situations, after you configure and run backup jobs in Veeam Backup & Replication, you may want to change something in the virtual infrastructure or in the backup strategy. For example, you may remove some machines from the virtual infrastructure or move them to another location. You may also exclude some machines from jobs that have already run for some time.

Retention policy for deleted items functions differently depending on the per-VM backup file option. For details, see Per-VM Backup Files.

  • [If per-VM is enabled] When you enable retention policy for deleted items, Veeam Backup & Replication will remove data for machines that are no longer processed by the backup job from the backup repository.
  • [If per-VM is disabled] When you enable retention policy for deleted items, Veeam Backup & Replication will remove the data about deleted items from the backup job and Veeam Backup & Replication database. The stored blocks of deleted machines will remain on the repository. The stored blocks of deleted machines will be removed only when the restore point retention limit is reached or by the compact full backup file option.

Retention policy for deleted items data is set at the level of the backup job. You must enable the Remove deleted items data after option in backup job settings and specify the period of time for which data for deleted items must be retained on the backup repository.

Mind the following:

  • You must use retention policy for deleted items data carefully. It is strongly recommended that you set the retention policy to 3 days or more to prevent unwanted data loss.
  • The Remove deleted items data after option lets you control data of deleted or excluded items. In addition to it, Veeam Backup & Replication applies general retention policy rules to maintain the necessary number of restore points in the backup chain. For more information, see Retention Policy.

Retention Policy for Deleted Items 

How Retention Policy for Deleted Items Works

If you enable retention policy for deleted items data in backup job settings, Veeam Backup & Replication performs the following actions:

  1. If all machines in the job are processed with the Success status, at the end of the backup job session Veeam Backup & Replication gets a list of machines in the backup.
  2. For every machine in the backup, Veeam Backup & Replication checks the configuration database and gets the date of the latest backup job session completed with the Success status.
  3. Veeam Backup & Replication checks if any machine in the backup meets the following conditions:
    • There are no successful backups for the machine for the last N days.
    • There are no corrupted backups for the machine for the last N days.

Where N is the number of days specified in the Remove deleted items data after N days setting.

  1. If both conditions are true for some machine, Veeam Backup & Replication removes data for this machine from the backup. Note that if per-VM is disabled, it does not free up space on the backup repository. It marks the space as available to be overwritten, and this space is removed during subsequent job sessions or the full backup file compact operation.

Example 1

You create a backup job for 2 VMs and set the retention policy for deleted items to 5 days. The backup job runs once a day for 7 times and processes VMs in the following way:

  • VM 1 is successfully processed during all job sessions.
  • VM 2 is successfully processed during the 1st and 2nd backup job sessions. Before the 3rd job session, VM 2 is excluded from the job and is not processed by subsequent job sessions.

During the 8th job session, Veeam Backup & Replication will remove data for VM 2 from backups on the backup repository since there are no successful and corrupted backups for VM 2 for the last 5 days.

Retention Policy for Deleted Items 

Example 2

You create a backup job for 2 machines and set the retention policy for deleted machines to 5 days. The backup job runs once a day for 7 times and processes machines in the following way:

  • VM 1 is successfully processed during all job sessions.
  • VM 2 is successfully processed during the 1st and 2nd backup job sessions. Starting from the 3rd job session, VM 2 fails to be processed, for example, due power loss while machine data is transported.

During the 8th job session, Veeam Backup & Replication will not remove data for VM 2 from backups on the backup repository. Even though there are no successfully created backups for VM 2 for the last 5 days, Veeam Backup & Replication will detect that the configuration database contains information about corrupted backups for VM 2 for the last 5 days.

Retention Policy for Deleted Items 

Limitations for Retention Policy for Deleted Items

[Per-VM is enabled] Retention policy for deleted items functions without limitations.

Related Topics

Creating Backup Jobs

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Agent Management Guide

Veeam Explorers User Guide

Backup and Restore of SQL Server Databases

Veeam Plug-ins for Enterprise Applications

PowerShell Reference

Veeam Explorers PowerShell Reference

RESTful API Reference

Required Permissions Reference

Quick Start Guide for VMware vSphere

Quick Start Guide for Microsoft Hyper-V

Veeam Availability for Nutanix AHV Documentation

Veeam Backup for Microsoft Office 365 Documentation

Veeam ONE Documentation

Veeam Agent for Windows Documentation

Veeam Agent for Linux Documentation

Veeam Management Pack Documentation