[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
Sun Dec 17 23:10:04 CET 2023
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30627
Chris Cormack <chris at bigballofwax.co.nz> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #158533|0 |1
is obsolete| |
--- Comment #6 from Chris Cormack <chris at bigballofwax.co.nz> ---
Created attachment 159931
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159931&action=edit
Bug 30627: Verify --days parameter and use find command to select old backups
for deletion
Test plan
* Create some old fake backups:
backuproot=/var/spool/koha
instance=kohadev
backupdir="$backuproot"/"$instance"
for i in 1 2 3 4 ; do
for j in sql tar xxx ; do
file="$backupdir"/"$instance"-$(date -I -d "- $i day").${j}.gz
if ! test -e "$file" ; then
touch -t "$(date +%Y%m%d%H%M -d "- $i day")" "$file"
fi
done
done
* Verify that --days parameter is validated
sudo koha-run-backups --days 0
sudo koha-run-backups --days foo
* Run backup
sudo koha-run-backups --days 3
* Verify that backups from 3 days have been preserved and older backups have
been deleted
* Verify that filenames that do not match the pattern (the .xxx.gz files) are
preserved
Signed-off-by: Chris Cormack <chris at bigballofwax.co.nz>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list