cadf36dc5f
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@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit
|
||
---|---|---|
.. | ||
koha-create | ||
koha-create-dirs | ||
koha-disable | ||
koha-dump | ||
koha-dump-defaults | ||
koha-elasticsearch | ||
koha-email-disable | ||
koha-email-enable | ||
koha-enable | ||
koha-es-indexer | ||
koha-foreach | ||
koha-functions.sh | ||
koha-indexer | ||
koha-list | ||
koha-mysql | ||
koha-mysqlcheck | ||
koha-passwd | ||
koha-plack | ||
koha-rebuild-zebra | ||
koha-remove | ||
koha-reset-passwd | ||
koha-restore | ||
koha-run-backups | ||
koha-shell | ||
koha-sip | ||
koha-sitemap | ||
koha-translate | ||
koha-upgrade-schema | ||
koha-upgrade-to-3.4 | ||
koha-worker | ||
koha-z3950-responder | ||
koha-zebra |