Commit ae9fb2d1 authored by Nigel Kukard's avatar Nigel Kukard

Merge branch 'enhanced-lv-path' into 'master'

Enhanced configuration of LV path specification

See merge request !21
parents b0800a8a 70d76561
Pipeline #939 passed with stages
in 1 minute and 16 seconds
...@@ -58,13 +58,32 @@ fi ...@@ -58,13 +58,32 @@ fi
# Loop with all LVS # Loop with all LVS
for lv in "${BACKUP_LVS[@]}" for lv in "${BACKUP_LVS[@]}"
do do
ITEM_LIST=$(echo "$lv" | cut -d, -f2-)
lv="${lv//,$ITEM_LIST/}"
OLD_IFS="$IFS"
IFS=','
read -a ITEMS -r <<< "$ITEM_LIST"
IFS="$OLD_IFS"
BIND_MOUNT_ARGS=()
for ITEM in "${ITEMS[@]}"
do
BIND_MOUNT_ARGS+=("--bind-mount")
BIND_MOUNT_ARGS+=("$ITEM:$ITEM")
done
# Backup to $PERIOD-$lv ... # Backup to $PERIOD-$lv ...
backstep-traceback --backup \ backstep-traceback --backup \
--acl \ --acl \
--safe \ --safe \
--deltas \ --deltas \
--create-timestamp-file \ --create-timestamp-file \
--lvm-snapshot lvm-raid/$lv \ --lvm-snapshot "$lv" \
"${BIND_MOUNT_ARGS[@]}" \
--email-subject "${PERIOD^^} $lv" \ --email-subject "${PERIOD^^} $lv" \
--email="$REPORT_EMAIL" \ --email="$REPORT_EMAIL" \
--port "$SERVER_PORT" --pubkey "$SERVER_KEY" \ --port "$SERVER_PORT" --pubkey "$SERVER_KEY" \
......
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