[Koha-bugs] [Bug 30627] koha-run-backups delete the backup files after finished its job without caring days option

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jan 12 20:54:11 CET 2024


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30627

--- Comment #7 from Victor Grousset/tuxayo <victor at tuxayo.net> ---
I don't understand the code enough to fully QA this but here are some findings.

why is there `\( -name \*.sql.gz -or -name \*.tar.gz \)` for the pattern?
Doesn't that negates the use of the preceding more strict pattern? Wait, is
that just to constrain the ??? to be either sql or tar? (just found that there
is an implicit AND (-a) when there is no operator between tests)

-----

About switching to using file metadata instead of file name to get the date.
There should be at least a mention in the documentation of --days and a mention
in the release notes ("Text to go in the release notes"). To lessen the chances
of mistakes due to eventual divergences there. So if there is one, we have less
to worry about and keep the proposed approach to use metadata.

Speaking of divergences, is file metadata something we can count on? I don't
know enough about managing servers and backups to reliably say if that's
reliable or not. Here are some thoughts
- if another backup system backups koha backup files, then we can expect date
to be preserved
- if the files are moved via ssh or something else to a new machine to restore
a koha backup (hardware upgrade for a koha server), then at worse date should
be reset to current date, so backups would be deleted later, that doesn't look
like much of an issue
- zip archives preserve the date
- copying on a FAT32 USB drive also
- if the place where the koha backup files are mounted is via some network
protocol, is that possible (and not that rare enough) that it doesn't support
date metadata? I recall with a phone using MTP (not a network protocol and MTP
has tons of very bad implementation) that all the files I copied to my PC got
their date set to 1970...
So that's the only real worry. Does date being reset to 1970 is a thing that
can happen enough to compromise the use of date metadata vs name?

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list