Skip to main content

Automatic Cleanup

Thread solved

I created a backup job to run 4 days/wk. Backup scheme is differential. I selected "Create a full backup after every 999 differential backups" so that I could use automatic cleanup .I also selected "Store no more than 5 recent version chains but I currently have 8 diff versions saved.  Why is auto cleanup not working?  

0 Users found this helpful

Automatic cleanup

There can be lots of confusion around the topic of automatic cleanup which can be better understood if some basic concepts are known!

First:  automatic cleanup only works on complete(d) versions / version chains.  Do not expect individual elements of version chains to be cleaned up, such as incremental or differential files!

Second: automatic cleanup only runs after a new Full backup for the next version / version chain has been created successfully.  This means that there must be sufficient free space available on the storage drive / location to hold a new Full backup image file!

Third: counting of days does not start until after a new Full backup file has been created when using the option to ‘Delete versions / version chains older than X days.’  It does not start for the active backup version / version chain before that point!

Fourth: the simplest & easiest automatic cleanup option to use & understand is to ‘Store no more than X recent versions / version chains.’  The criteria here means that if you set X = 2, then when the X+1 (3rd) version / version chain is created successfully with a new Full backup file, then the oldest version / version chain will be deleted by automatic cleanup.

Example:

Incremental backup task, using Full plus 5 Incremental backups before next new Full backup.

Task scheduled to run daily with automatic cleanup set to ‘Store no more than 2 version chains.’

Day 1 – Full backup created.

Days 2 – 6 Incremental backups created.

Day 7 – Next new Full backup created. 

Days 8 – 12 Incremental backups created.

Day 13 – Next new Full backup created.  Automatic cleanup deletes files created on days 1 – 6.

If the same task used ‘Delete version chains older than 7 days’, then those 7 days wouldn’t start counting until day 7 for the first set of files (version chain 1) and not until day 13 for the second set etc.  So automatic cleanup wouldn’t delete the oldest chain until day 14 in the above example.

Thanks Steve, now I understand and have adjusted my scheme accordingly.

In your example, If this was for a differential backup task, is every differential considered a completed chain?  Could you please describe when each file would be created and deleted?    

The same rule applies for both differential and incremental chains - cleanup only runs automatically for completed chains and only after a new Full backup has been created successfully. 

If you want to delete individual differential files then it would have to be done using the Clean up versions tool to avoid any issues with metadata or the internal tracking database - it should not be done from Explorer.

A completed chain is defined by your Backup scheme settings, i.e. if you have a scheme set to create a new Full backup after creating 5 differential backups, then that is what defines when the chain is complete (when you have the number of files created to match those settings - 1 x Full and 5 x differential).

Rcstan, you said 999 differentials and running four days per week. On this plan it would take nearly five years to complete a chain. But you would have problems far sooner than; a differential is the difference since the full backup so before long you'd find that every differential is nearly as big as the full.

Consider 1) differential or incremental? and 2) how many before a new full backup is done. Analysis of backup file sizes is important to consider with the available space on the backup drive(s).

Hopefully your new plan is doing what you want.

Thanks again Steve.  If you don't mind I have one last question.  If I make any change to the scheme mid-way, for instance if I change the "Store no more than 4 version chains to 2 chains" before the first chain is complete, will this reset the scheme so that it starts with a new full backup for will it just continue to store only the 2 chains?  Thank you for your help.

It shouldn't reset the scheme to start a new full backup if only changing the number of chains to keep, i.e. from 4 to 2, that should just cause the oldest chains to be deleted sooner if the number is already exceeded.

If you change the number of incrementals or differentials in a chain, then that could cause a reset with a new Full.