Bug 14378 - koha-run-backups should check disk usage first
Summary: koha-run-backups should check disk usage first
Status: CLOSED WONTFIX
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Galen Charlton
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-12 14:06 UTC by Pablo AB
Modified: 2020-11-30 21:45 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pablo AB 2015-06-12 14:06:24 UTC
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 (%)).
Comment 1 Joonas Kylmälä 2015-08-20 11:14:25 UTC
(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.
Comment 2 Robin Sheat 2015-08-23 23:28:05 UTC
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.
Comment 3 Tomás Cohen Arazi 2015-08-23 23:49:34 UTC
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).
Comment 4 Katrin Fischer 2020-01-07 22:15:31 UTC
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.