[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 26 09:51:06 CET 2024
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30627
Marcel de Rooy <m.de.rooy at rijksmuseum.nl> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #159931|0 |1
is obsolete| |
--- Comment #9 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Created attachment 161494
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161494&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>
Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list