Remove old backups before saving the new ones

Backup and Restore provides a possibility to automatically delete old backups of certain age set in the backup schedules, however this functionality, unfortunately, is triggered only after the new backups are stored and not before. This represents a problem on systems with limited storage space and which have just enough space for only one instance of backups. So it would be quite logical to delete old backups to free up some space and then start storing new backups. I believe there is no particular reason to delete old backups only after the new ones are saved.

Status: 
Closed (works as designed)

Comments

Howdy -- the current functionality is setup to handle the potential case where the backups don't work properly.

That is, in some cases, the backup process itself fails.

If it fails, and the backups were already deleted, then the admin could be left with no viable backups, which is a case we hoped to avoid.

I know this may not work for everyone, but on my own personal servers, what I do is review how much space I have available, and then decide how many days worth of backups I can store.

If the answer is "7 days", what I do is setup a set of directories like "Monday", "Tuesday", "Wednesday", etc in my backup directory, and store the backups there.

I then setup the backup process to overwrite the previous weeks backups.

When doing that, since it's overwriting the previous backup, there is always enough space for the new backups.

Another alternative would be to use the "Command to run before backup" option to delete the backups you no longer want.

How about a check box to delete first or last ?? That way the user can decide what is best for them.

I make more then 1 backup so deleting first for me would be nice. But thats my 2 cents

I suppose we could add that, however I'm reluctant as it would be a very dangerous feature if the user is keeping only one backup.

I suppose we could add that, however I'm reluctant as it would be a very dangerous feature if the user is keeping only one backup.

Status: Active ยป Closed (works as designed)

I believe Eric's idea to use the "Command to run before backup" option to delete unneeded backups is the right approach. So I am marking this as closed.