Keep archival backups

As it stands Virtualmin can schedule backups and keep files for a period of time. I would like to be able to do the following (for example):

Keep nightly backups for 14 days keep the oldest backup for 1 month

#basically
if the file is older than 14 days
  if there exists a file older than 14 days
    delete it
  otherwise
    dont delete it
end if

If file is older than 28 days
delete it

This type of scheduling is probably possible by writing a script to run (either before or after the backup) that says; If the file in the archive folder is older than 30 day, overwrite it with the oldest file in the backup folder.

Whatever solution would work best, but archival backups are important.

Status: 
Active

Comments

The only supported way to do this currently in Virtualmin would be to have two different backup schedules to different destinations - one that runs daily and deletes after 14 days, and one that runs monthly and deletes after 2 months.