Naively I increase --days koha-run-backups parameter too high (30) letting disc out of space. It could be a nice enhancement: + Check disk space before generating files (for eg with fallocate: preallocate space to a file)) + and/or sacrifice/remove older backup. + option to backup indefinitely until destination dir/partition grow up to a given percentage (lets say 95 (%)).
(In reply to Pablo AB from comment #0) > + option to backup indefinitely until destination dir/partition grow up to a > given percentage (lets say 95 (%)). The size of backups & free space could vary then quite a lot if there is a huge/small storage in use. I suggest to leave there some nMb/nGb of space.
Keep in mind that filesystems have a capability to reserve a certain percentage for the root user, preventing things from going catastrophically bad when they fill up. While not exactly the same thing, that should give you some protection.
I suggest taking a look at bug 14532, which makes backups skip Zebra index files by default and would prevent most of the problems. As for the enhancement request, I'd say you can now choose how many backups to keep (days) and that's pretty much all you need. As robin said, it is not obvious to know how big the backup would be, and it might not even be necessary with current options (and bug 14532 that needs some love from you).
From the comments I think that this is probably not something we can fix Koha side apart from making the backups smaller by giving options. Closing WONTFIX.