@trialotto, it's just an simple example to demonstrate a workaround via command line options specific for the OP's issue. Not a full featured script for that accounts for a multitude of use cases. It's available for any one to use and adapt to their own needs, including yourself
@Kaspar,
That would be a rather logical conclusion.
However, deleting the 1-day old backup files might not be the best idea ....... whereas the deletion of older backup files still is not a good idea (I admit !), but it is slightly better : the whole concept of Plesk backup logic should take care of the removal of old backup files (being either 1-day old or x-days old), but there is this odd behavior with failing Plesk backups that causes very old backup files to persist locally.
Hence the request ........ it is a simple suggestion to change your script to one that allows for deletion of all old backups that exceed a specific number of days (and that, by default Plesk backup logic, should not be present anymore).
Nevertheless, fair point : anybody should adopt and change the script as they seem fit.
Kind regards...
PS In some sense, your logic with respect to freedom of users to use and adopt your bash script is equivalent to "you sharing, others not sharing and having an incentive to not share". So, yes, fair point to not change / adopt the script yourself and/or to allow other people to adopt the script to fit their needs. The actual downside of this approach is that we will have some posts of failed backups and/or failures to restore backups in the near future, since some people will adopt and change the script perfectly and other people will not.
I am happy that you at least made an effort and that
@Sebahat.hadzhi noticed the script ............ after all, these kinds of minor adjustments to Plesk backup logic are essentially the domain of Plesk. It is something that can add value and that should have been introduced years ago.