cancel
Showing results for 
Search instead for 
Did you mean: 

Inc Backup Sets Blocking Full Backup Deletion

create_share
Level 6

Hi,

I need to delete my Exchange Full Backup Set after 6 days automatically but the incremental sets are blocking the deletion because of their expiry time which is more than the Full Backup set. How can I let the system delete the Incremental sets together with the Full Backup?

Thanks.

2 REPLIES 2

pkh
Moderator
Moderator
   VIP    Certified

The full backups would be automatically deleted once its dependencies (the incrementals) are deleted.

meuhassan
Level 4

There are a few ways to let the system delete the Incremental sets together with the Full Backup. One way is to change the retention policy for the Incremental sets to expire at the same time as the Full Backup. You can do this by following these steps:

  1. Open the Exchange Management Console.
  2. Click on the "Server Configuration" node.
  3. Click on the "Backup" node.
  4. Click on the "Settings" tab.
  5. Scroll down to the "Retention" section.
  6. In the "Incremental Backup Retention" field, enter the number of days that you want the Incremental sets to be retained.
  7. Click on the "OK" button.

Once you have changed the retention policy for the Incremental sets, they will be deleted automatically along with the Full Backup after the specified number of days.

Another way to let the system delete the Incremental sets together with the Full Backup is to use a PowerShell script. The following PowerShell script will delete all Incremental sets that are older than the specified number of days:

$days = 6
$backups = Get-Backup -BackupType Incremental
foreach ($backup in $backups) {
    if ($backup.ExpirationDate -le (Get-Date).AddDays($days)) {
        Remove-Backup -Backup $backup
    }
}

This script will first get a list of all Incremental backups. It will then iterate through the list of backups and delete any backups that are older than the specified number of days.

You can run this script from the Exchange Management Shell or from a command prompt.

Once you have run the script, all Incremental sets that are older than the specified number of days will be deleted automatically.