@@ -, +, @@ --exclude_indexes option switch to koha-dump. This way if the sysadmin $ debian/scripts/koha-run-backups --days 2 --output /var/spool/koha $ ls -lh /var/spool/koha/kohadev $ debian/scripts/koha-run-backups \ --exclude_indexes \ --days 2 --output /var/spool/koha --- debian/docs/koha-run-backups.xml | 7 +++++++ debian/scripts/koha-run-backups | 13 ++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) --- a/debian/docs/koha-run-backups.xml +++ a/debian/docs/koha-run-backups.xml @@ -46,6 +46,13 @@ + + + + Exclude Zebra indexes from the backups (default: false). + + + --- a/debian/scripts/koha-run-backups +++ a/debian/scripts/koha-run-backups @@ -28,10 +28,11 @@ This allows automation of backing up the koha data and configuration to the filesystem. It will keep the past so many backups, discarding older ones. Options: - --output: the directory that the resulting files will be placed into. - (default: /var/spool/koha) - --days: the number of days to keep backups around for - (default: 2) + --output /path The directory that the resulting files will be placed into. + (default: /var/spool/koha) + --days 2 The number of days to keep backups around for + (default: 2) + --exclude_indexes Exclude Zebra indexes from the backups (default: false) Note: backups produced using this tool can be restored using \`koha-restore'. EOH @@ -50,6 +51,8 @@ while true ; do days=$2; shift 2 ;; --output) dirname=$2; shift 2 ;; + --exclude-indexes) + exclude_indexes="--exclude_indexes"; shift ;; --) shift ; break ;; *) echo "Unknown error parsing the command line!" ; exit 1 ;; esac @@ -57,7 +60,7 @@ done for name in $(koha-list --enabled | grep -Fxv demo) do - koha-dump "$name" > /dev/null + koha-dump ${exclude_indexes} "$name" > /dev/null if [ -z "$dirname" ]; then backupdir="$( xmlstarlet sel -t -v 'yazgfs/config/backupdir' /etc/koha/sites/$name/koha-conf.xml )"; else --