From ffa8ec12f10cc6c5df681b581d2dda5510ede047 Mon Sep 17 00:00:00 2001 From: Martin Winkler Date: Sun, 20 Nov 2022 07:42:50 +0100 Subject: [PATCH] ebackup - Add allow-source-mismatch option --- seqs/ebackup.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/seqs/ebackup.sh b/seqs/ebackup.sh index d4dad9a..e184016 100755 --- a/seqs/ebackup.sh +++ b/seqs/ebackup.sh @@ -35,6 +35,8 @@ step_1_info() { echo " [OPTIONS] [full|incremental]" echoinfo " [OPTIONS]" echoinfo " --no-purge, -n : Do not purge old backups after backup" + echoinfo " --allow-source-mismatch, -a : see ${toolName:-} help" + } step_1_alias() { echo "backup"; } step_1() { @@ -44,13 +46,16 @@ step_1() { local retVal local dupArgs local purgeAfter=1 + local lSourceMismatch= for arg in "$@" ; do case "$1" in --no-purge|-n) purgeAfter=0 - shift - ;; + shift ;; + --allow-source-mismatch|-a) + dupArgs+=("--allow-source-mismatch") + shift ;; esac done @@ -68,10 +73,10 @@ step_1() { echo " [I] Running backup profile [$seq_profileName]" - if [ "${dupArgs[0]:-}" != "full" ] && [ ! -z "$EBU_MAX_FULLBKP_AGE" ] ; then + if [ "${dupArgs[0]:-}" != "full" ] && [ -n "$EBU_MAX_FULLBKP_AGE" ] ; then dupArgs+=(--full-if-older-than "$EBU_MAX_FULLBKP_AGE") fi - if [ ! -z "$EBU_VOLSIZE" ] ; then + if [ -n "$EBU_VOLSIZE" ] ; then dupArgs+=(--volsize "$EBU_VOLSIZE") fi