@@ -30,11 +30,11 @@ export_tool_available() {
30
30
}
31
31
32
32
ghe_ssh_mssql () {
33
- ghe-ssh $ opts $ ssh_config_file_opt " $GHE_MSSQL_PRIMARY_HOST " " $@ "
33
+ ghe-ssh " ${ opts[@]} " " ${ ssh_config_file_opt[@]} " " $GHE_MSSQL_PRIMARY_HOST " " $@ "
34
34
}
35
35
36
36
cleanup () {
37
- rm -rf $tempdir
37
+ rm -rf " $tempdir "
38
38
}
39
39
trap ' cleanup' EXIT INT
40
40
@@ -55,8 +55,8 @@ isHA="$(ghe-ssh "$GHE_HOSTNAME" -- "ghe-config cluster.ha" || true)"
55
55
# get server hostnames under cluster and HA
56
56
if [ " $GHE_BACKUP_STRATEGY " = " cluster" ] || [ " $isHA " = " true" ] ; then
57
57
ssh_config_file=" $tempdir /ssh_config"
58
- ssh_config_file_opt=" -F $ssh_config_file "
59
- opts=" -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PasswordAuthentication=no"
58
+ ssh_config_file_opt=( " -F" " $ssh_config_file " )
59
+ opts=( " -o" " UserKnownHostsFile=/dev/null" " -o " " StrictHostKeyChecking=no" " -o " " PasswordAuthentication=no" )
60
60
ghe-ssh-config " $GHE_HOSTNAME " " $GHE_MSSQL_PRIMARY_HOST " > " $ssh_config_file "
61
61
fi
62
62
@@ -69,10 +69,10 @@ add_minute() {
69
69
# Expect date string in the format of yyyymmddTHHMMSS
70
70
# Here parse date differently depending on GNU Linux vs BSD MacOS
71
71
if date -v -1d > /dev/null 2>&1 ; then
72
- echo " $( date -v +$2 M -ujf' %Y%m%dT%H%M%S' $1 +%Y%m%dT%H%M%S) "
72
+ date -v +" $2 " M -ujf' %Y%m%dT%H%M%S' " $1 " +%Y%m%dT%H%M%S
73
73
else
74
74
dt=$1
75
- echo " $( date -u ' +%Y%m%dT%H%M%S' -d " ${dt: 0: 8} ${dt: 9: 2} :${dt: 11: 2} :${dt: 13: 2} $2 minutes" ) "
75
+ date -u ' +%Y%m%dT%H%M%S' -d " ${dt: 0: 8} ${dt: 9: 2} :${dt: 11: 2} :${dt: 13: 2} $2 minutes"
76
76
fi
77
77
}
78
78
@@ -337,7 +337,7 @@ if [ -n "$backup_type" ]; then
337
337
fi
338
338
339
339
bm_start " $( basename " $0 " ) "
340
- ghe_ssh_mssql -- " $backup_command " || failures= " $failures mssql "
340
+ ghe_ssh_mssql -- " $backup_command "
341
341
bm_end " $( basename " $0 " ) "
342
342
343
343
# Configure the backup cadence on the appliance, which is used for diagnostics
0 commit comments