ZPM support added (THX to Sergey Mikhailenko)
cmPurgeBackup is an utility that can be used to erase old InterSystems IRIS/Caché/Ensemble Online Backup files. It runs as a Task Manager task. It is fully compatible with all predefined classes of backup tasks, such as FullDBList, IncrementalDBList, etc., and it does not require any changes to the code that is used in these tasks.
Objectscript contest template was used; Topic and Terms.
$ git clone https://github.com/AlexeyM64/cmPurgeBackup.git
$ cd cmPurgeBackup; docker-compose build
$ docker-compose up -d
Point your browser to System Management Portal and go to System > Task Manager > Task Schedule. You will notice two custom tasks: FullDBList and cmPurgeBackup. The first is scheduled to run on demand, the latter - to run on FullDBList completion.
Current setting of cmPurgeBackup is to leave the last Full Backup file (.cbk) only; you may change it if you wish. Possible task's settings are discussed in the correspondent Developer Community article.