Looking for retention policy/mechanism for H2 backup

Hello,
we are currently using Sonatype Nexus 3.73.0 in a Docker container with a volume.

The task “Admin - Backup H2 Database” is executed daily and the entire volume (H2 backup, blob files, etc.) is backed up. The problem is that the H2 backup task only creates new backup files, but does not delete old ones. As a result, the size of the backup folder grows continuously.
I would therefore need some kind of retention policy for this.

I have already thought of a bash script and a cron job. However, these will disappear again when the Docker container is restarted.
Does anyone have any other ideas on how I can implement this? Preferably with native features from Nexus.