Commit 6ef0a674 authored by Nigel Kukard's avatar Nigel Kukard

Merge branch 'single-backup-option' into 'master'

Add an option to only do a specific lv

See merge request !32
parents c1ba4e20 3aa362fa
Pipeline #1147 passed with stages
in 2 minutes and 34 seconds
......@@ -31,7 +31,17 @@ esac
# Parse options
OPTIND=1
getopts ":v" OPTION
while getopts ":o:v" OPTION
do
case "$OPTION" in
o)
ONLY="$OPTARG"
;;
v)
VERBOSE="true"
;;
esac
done
# Remove option from parameters
shift $(expr $OPTIND - 1)
......@@ -49,7 +59,7 @@ else
fi
# Change sync options for when we are debugging
if [ "$OPTION" = "v" ]
if [ "$VERBOSE" = "true" ]
then
syncopts="--debug --max-load=$DEBUG_MAX_LOAD"
set -ex
......@@ -60,6 +70,11 @@ fi
# Loop with all LVS
for LV in "${BACKUP_LVS[@]}"
do
if [ -n "$ONLY" ] && [ "$ONLY" != "$LV" ]
then
continue
fi
OLD_IFS="$IFS"
IFS=','
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment