https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30627
Andreas Jonsson <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #3 from Andreas Jonsson <[email protected]> --- I do not understand why it is validated that a complete pair of sql.gz and tar.gz exists before deleting the pair. As if it would be especially desirable to preserve backups that may have failed before being completed indefinitely. I suggest that we don't do this. We can select files for deletion with the `find' command. We can use the modification time instead of the date in the filename. These should normally be the same. We can also use a stricter pattern for matching files to avoid deleting files that have not been created by the backup script. For instance: find $backupdir -maxdepth 1 \( -mtime +$days -or -mtime $days \) \ -name $name-'[1-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].???'.gz \ \( -name \*.sql.gz -or -name \*.tar.gz \) -print0 | xargs -0 -r rm -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
