ebackup - Add allow-source-mismatch option
This commit is contained in:
@@ -35,6 +35,8 @@ step_1_info() {
|
|||||||
echo " [OPTIONS] [full|incremental]"
|
echo " [OPTIONS] [full|incremental]"
|
||||||
echoinfo " [OPTIONS]"
|
echoinfo " [OPTIONS]"
|
||||||
echoinfo " --no-purge, -n : Do not purge old backups after backup"
|
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_alias() { echo "backup"; }
|
||||||
step_1() {
|
step_1() {
|
||||||
@@ -44,13 +46,16 @@ step_1() {
|
|||||||
local retVal
|
local retVal
|
||||||
local dupArgs
|
local dupArgs
|
||||||
local purgeAfter=1
|
local purgeAfter=1
|
||||||
|
local lSourceMismatch=
|
||||||
|
|
||||||
for arg in "$@" ; do
|
for arg in "$@" ; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--no-purge|-n)
|
--no-purge|-n)
|
||||||
purgeAfter=0
|
purgeAfter=0
|
||||||
shift
|
shift ;;
|
||||||
;;
|
--allow-source-mismatch|-a)
|
||||||
|
dupArgs+=("--allow-source-mismatch")
|
||||||
|
shift ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -68,10 +73,10 @@ step_1() {
|
|||||||
|
|
||||||
echo " [I] Running backup profile [$seq_profileName]"
|
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")
|
dupArgs+=(--full-if-older-than "$EBU_MAX_FULLBKP_AGE")
|
||||||
fi
|
fi
|
||||||
if [ ! -z "$EBU_VOLSIZE" ] ; then
|
if [ -n "$EBU_VOLSIZE" ] ; then
|
||||||
dupArgs+=(--volsize "$EBU_VOLSIZE")
|
dupArgs+=(--volsize "$EBU_VOLSIZE")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user