dsnap-sync: code identation update
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
@@ -180,7 +180,7 @@ create_snapshot () {
|
||||
printf "${MAGENTA}Snapper source snapshot ${GREEN}'%s'${MAGENTA} created${NO_COLOR}\n" "$snapper_source_id"
|
||||
fi
|
||||
else
|
||||
printf "dryrun: Creating source snapshot with snapper config '%s' ...\n" "$selected_config"
|
||||
printf "dryrun: Would create source snapshot with snapper config '%s' ...\n" "$selected_config"
|
||||
snapper_source_sync_id="<snapper_source_id>"
|
||||
fi
|
||||
}
|
||||
@@ -976,9 +976,15 @@ run_config_preparation () {
|
||||
"snapper_uuid=" "snapper_subvolid=" "remote=${remote}"
|
||||
snapper_target_sync_id=$snapper_sync_id
|
||||
if [ $snapper_target_sync_id -eq 0 ]; then
|
||||
if [ $verbose -eq 1 ]; then
|
||||
if [ $verbose -ge 1 ]; then
|
||||
if [ $remote ]; then
|
||||
printf "${MAGENTA}No target shapshot available for snapper config ${GREEN}'%s'${MAGENTA} on '%s'...${NO_COLOR}\n" \
|
||||
"$selected_config" "$remote"
|
||||
else
|
||||
printf "${MAGENTA}No target shapshot available for snapper config ${GREEN}'%s'${MAGENTA}...${NO_COLOR}\n" \
|
||||
"$selected_config"
|
||||
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# get backupdir from snapper target
|
||||
@@ -1078,7 +1084,7 @@ run_backup () {
|
||||
create_snapshot
|
||||
;;
|
||||
*)
|
||||
if [ $verbose -gt 2 ]; then
|
||||
if [ $verbose -ge 2 ]; then
|
||||
printf "{RED}TODO:{NO_COLOR} what is needed for config_type '%s'?\n" "$snapper_config_type"
|
||||
fi
|
||||
;;
|
||||
@@ -1857,16 +1863,16 @@ verify_snapper_structure () {
|
||||
# verify that we have a snapper compatible structure for target config (a btrfs subvolume)
|
||||
cmd="$ssh stat --format %i $backup_root 2>/dev/null"
|
||||
if [ -z $(eval $cmd) ]; then
|
||||
if [ ! "$dryrun" ]; then
|
||||
if [ $verbose -ge 1 ]; then
|
||||
if [ -z "$remote" ]; then
|
||||
printf "${MAGENTA}Create${NO_COLOR} new snapper capable BTRFS ${MAGENTA}subvolume ${GREEN}'%s'${NO_COLOR} ...\n" \
|
||||
"$backup_root/$snapper_config"
|
||||
"$backup_root"
|
||||
else
|
||||
printf "${MAGENTA}Create${NO_COLOR} new snapper capable BTRFS ${MAGENTA}subvolume ${GREEN}'%s'${NO_COLOR} on ${MAGENTA}remote host ${GREEN}'%s'${NO_COLOR} ...\n" \
|
||||
"$backup_root" "$remote_host"
|
||||
fi
|
||||
fi
|
||||
if [ ! "$dryrun" ]; then
|
||||
# verify that we can use the correct snapper template
|
||||
cmd="$ssh stat --format %i $SNAPPER_TEMPLATE_DIR/$snapper_subvolume_template 2>/dev/null"
|
||||
if [ -z $(eval $cmd) ]; then
|
||||
|
||||
Reference in New Issue
Block a user