A retention policy defines how long your data should be kept in a backup repository.
Removal of obsolete data occurs according to the schedule which is defined when configuring a new backup repository and is based on calculating the item modification time.
The following figure demonstrates three simplified database files, each of which contains Microsoft Office 365 items as per year, where each item has its own modification time.
For example, your retention policy is said to be applied at 10:20 AM on September 1, 2018. In such a scenario, Veeam will remove the Item 1 from the Backup 1 repository because the Item 1 exceeds the retention period (2 years in our example) by 20 minutes, as it was last modified exactly at 10:00 AM on September 1, 2016.
The next item to be removed is the Item 2 because its last modifications were made at 10:20 AM on November 11, 2016. That said, when a retention policy is being applied, for example, at 10:30 AM on November 11, 2018, Veeam will remove the Item 2 because its age equals 2 years and 10 minutes, which exceeds the specified threshold.
The aforementioned algorithm repeats itself until no other items left in a repository, then Veeam completely removes such a repository from the hard drive.
The backup job, in turn, does not archive items, the modification time of which exceeds the specified retention period.