Background Retention
In addition to applying a retention policy (short-term retention and long-term retention) within a job session, Veeam Backup & Replication performs background retention for backups. The background retention aims mostly at backups that are no longer processed by jobs (orphaned backups shown in the node with the (Orphaned) postfix). However, this retention can also be helpful for standard backups, in case backups are created by jobs without a schedule, the job retention has not been applied yet or failed for some reason, and so on.
The background retention starts automatically every 24 hours at 00:30, runs in the background and consists of the following activities:
- Background basic retention
- Background GFS retention
- Background log retention
- Backup cleanup
- Deleted Agent retention
Limitations
The background retention does not apply to the following backups:
- Backups stored on backup repositories with rotated drives.
- Backups stored in the archive tiers of scale-out backup repositories.
- Backups stored in the capacity tier. For details, see section Considerations.
- Imported backups.
- Unstructured Data Backup.
- Replicas (including CDP replicas).
- VeeamZIP backups.
- Exported backups.
- Copied backups.
- Backups exported by Kasten policies.
- Backups created by Veeam Plug-ins for Enterprise Applications and Veeam Cloud Plug-ins (Veeam Backup for AWS, Veeam Backup for Google Cloud, Veeam Backup for Microsoft Azure).
Consider the following:
- Like the job retention, the background retention cannot delete immutable backup files. The background retention waits until the immutability and retention periods end for these files.
- [For backups linked to jobs] If the retention is set in days, Veeam Backup & Replication leaves at least 3 backup files in a backup chain regardless of the set retention. If the retention is set in restore points, Veeam Backup & Replication leaves backup files in a backup chain. The minimum number of backup files left equals the current retention period. You can delete these backup files manually as described in section Deleting Backups from Disk.
- [For orphaned backups] If the retention is set in days, Veeam Backup & Replication can remove all outdated backup files in a backup chain. If the retention is set in restore points, Veeam Backup & Replication leaves backup files in a backup chain. The minimum number of backup files left equals the current retention period. You can delete these backup files manually as described in section Deleting Backups from Disk.
- [For backups stored in the capacity tier] Background retention job does not delete capacity tier copies of backup data directly. However, if background retention removes local copies of backups, they may also be marked for removal on the capacity tier. In such a case, cleanup during the next SOBR offloading session will remove them from the capacity tier.
- [For backups created with Veeam Agents operating in standalone or managed by Veeam Agent mode] For backups stored in an object storage repository operating in the direct connection mode, basic retention and GFS retention do not apply. For non-orphaned backups stored in other repositories, basic retention does not apply. For orphaned backups operating in either mode, basic retention applies.
- Unlike the job retention, the background retention does not merge data from one backup file to another; it just deletes files. In the case of forever forward incremental and forward incremental backup chains, the background retention deletes incremental files only after the last increment in the related part of the backup chain becomes outdated.
- The background retention does not delete backup files if they are locked by other processes. The retention waits until the backup file is unlocked.
- You can launch the background retention manually as described in section Launching Background Retention.
Background Basic Retention
Background basic retention process analyzes the retention period set for backup files. In the case of orphaned backups, Veeam Backup & Replication analyzes the retention period that was set in the job that created this backup. If the retention period has expired, Veeam Backup & Replication removes the backup files.
Background GFS retention process detects backup files with GFS flags and analyzes their retention period. If the retention period for GFS flags of such backup files has expired, Veeam Backup & Replication removes GFS flags. Then Veeam Backup & Replication deletes these backup files according to the short-term retention policy if the following conditions are met:
- The backup file does not have any other GFS flags assigned.
- The backup file does not have any dependent files.
Background retention job applies to backup files created by all types of jobs that use GFS. For more information about GFS retention policy, see Long-Term Retention Policy (GFS).
Background Log Retention
Background log retention detects logs whose related image-level backup was deleted by background retention. Then Veeam Backup & Replication deletes these log files.
Backup Cleanup
Backup cleanup applies only to orphaned backups. After the whole orphaned backup chain is deleted, Veeam Backup & Replication also deletes the .VBM file and the folder where the backup chain was stored.
Deleted Agent Retention
Deleted agent retention is a process that detects and deletes outdated backup files according to Veeam Agent retention policy for outdated backups.
An outdated backup file is a backup file for which no new restore points were created and no new backup job sessions were started within the last N days, where N is the retention period specified in the Veeam Agent backup job settings.
For more information, see Retention Policy for Outdated Backups article in the Veeam Agent for Microsoft Windows User Guide and Maintenance Settings article in the Veeam Agent Management Guide.
Cloud Connect Background Retention
In the Veeam Cloud Connect infrastructure, independent retention is applied to tenant backups on the service provider side. The background retention job runs automatically in Veeam Backup & Replication on the service provider backup server according to the same rules as in the regular Veeam backup infrastructure. The service provider can also launch background retention manually as described in section Launching Background Retention.
On the tenant side, Veeam Cloud Connect repositories are skipped from processing by the background retention job launched automatically and manually. For more information, see the Background Retention for Tenant Backups section in the Veeam Cloud Connect Guide.
Related Links