@@ -151,7 +151,7 @@ if [ -z "$supported" ]; then
151
151
fi
152
152
153
153
if [[ " $CALLING_SCRIPT " == " ghe-backup" && " $GHE_SKIP_CHECKS " != " true" ]]; then
154
- cat << SKIP_MSG 1>&2
154
+ cat << SKIP_MSG
155
155
**You can disable the following storage & version checks by running ghe-backup with option "--skip-checks"
156
156
OR updating GHE_SKIP_CHECKS to 'true' in your backup.config file.
157
157
@@ -176,10 +176,10 @@ SKIP_MSG
176
176
fi
177
177
178
178
# Display dir requirements for repositories and mysql
179
- echo " " 1>&2
180
- echo " Checking host for sufficient space for a backup..." 1>&2
179
+ echo -e " \n "
180
+ echo " Checking host for sufficient space for a backup..."
181
181
available_space=$( df -B 1k $GHE_DATA_DIR | awk ' END{printf "%.0f", $4 * 1024}' )
182
- echo " We recommend allocating at least 5x the amount of storage allocated to the primary GitHub appliance for historical snapshots and growth over time." 1>&2
182
+ echo " We recommend allocating at least 5x the amount of storage allocated to the primary GitHub appliance for historical snapshots and growth over time."
183
183
184
184
repos_disk_size=$( transfer_size repositories /tmp)
185
185
pages_disk_size=$( transfer_size pages /tmp)
@@ -192,10 +192,10 @@ SKIP_MSG
192
192
193
193
min_disk_req=$(( repos_disk_size + pages_disk_size + es_disk_size + stor_disk_size + minio_disk_size + mysql_disk_size + actions_disk_size + mssql_disk_size))
194
194
recommended_disk_req=$(( min_disk_req * 5 ))
195
- echo " - Available space: $(( available_space / (1024 ** 2 )) ) MB" 1>&2
196
- echo " - Min Disk required for this backup is at least $min_disk_req MB" 1>&2
197
- echo " - Recommended Disk requirement is $recommended_disk_req MB" 1>&2
198
- echo " " 1>&2
195
+ echo " - Available space: $(( available_space / (1024 ** 2 )) ) MB"
196
+ echo " - Min Disk required for this backup is at least $min_disk_req MB"
197
+ echo " - Recommended Disk requirement is $recommended_disk_req MB"
198
+ echo -e " \n "
199
199
200
200
printf ' ### Estimated Data Transfer Sizes
201
201
@@ -208,7 +208,7 @@ SKIP_MSG
208
208
- actions: %d MB
209
209
- mssql: %d MB
210
210
\n' \
211
- " $repos_disk_size " " $pages_disk_size " " $es_disk_size " " $stor_disk_size " " $minio_disk_size " " $mysql_disk_size " " $actions_disk_size " " $mssql_disk_size " 1>&2
211
+ " $repos_disk_size " " $pages_disk_size " " $es_disk_size " " $stor_disk_size " " $minio_disk_size " " $mysql_disk_size " " $actions_disk_size " " $mssql_disk_size "
212
212
213
213
if [[ $(( available_space / (1024 * 1024 )) ) -lt $min_disk_req ]]; then
214
214
echo " There is not enough disk space for the backup. Please allocate more space and continue." 1>&2
@@ -231,7 +231,7 @@ SKIP_MSG
231
231
exit 1
232
232
fi
233
233
234
- echo " ### Software versions" 1>&2
234
+ echo " ### Software versions"
235
235
rsync_version=$( rsync --version | grep ' version' | awk ' {print $3}' | tr -cd ' [:digit:].\n' )
236
236
if awk " BEGIN {exit !($rsync_version < $min_rsync )}" & > /dev/null; then
237
237
echo " rsync version $rsync_version in backup-host does not meet minimum requirements." 1>&2
@@ -241,17 +241,17 @@ SKIP_MSG
241
241
printf " \n **WARNING:** rsync version %s on backup host is less than 3.2.5, which could result in performance degradation.
242
242
For more details, please read documentation at https://gh.io/april-2023-update-of-rsync-requirements
243
243
You can disable this warning by changing RSYNC_WARNING to 'no' in your backup.config file.\n\n" \
244
- " $rsync_version " 1>&2
244
+ " $rsync_version "
245
245
fi
246
- echo " - rsync ${rsync_version} >= required ($min_rsync )" 1>&2
246
+ echo " - rsync ${rsync_version} >= required ($min_rsync )"
247
247
248
248
ssh_version=$( ssh -V 2>&1 | awk ' {print $1}' | grep -oPm 1 ' [\d\.]+' | head -1 | tr -cd ' [:digit:].\n' )
249
249
if awk " BEGIN {exit !($ssh_version < $min_openssh )}" & > /dev/null; then
250
250
echo " openSSH version $ssh_version in backup-host does not meet minimum requirements." 1>&2
251
251
echo " Please make sure the minimum required version of openSSH: $min_openssh is installed" 1>&2
252
252
exit 1
253
253
else
254
- echo " - openSSH ${ssh_version} >= required ($min_openssh )" 1>&2
254
+ echo " - openSSH ${ssh_version} >= required ($min_openssh )"
255
255
fi
256
256
257
257
jq_version=$( jq --version | awk -F\- ' {print $2}' | tr -cd ' [:digit:].\n' )
@@ -260,8 +260,8 @@ SKIP_MSG
260
260
echo " Please make sure you have the minimum required version of jq: $min_jq installed" 1>&2
261
261
exit 1
262
262
else
263
- echo " - jq ${jq_version} >= required ($min_jq )" 1>&2
263
+ echo " - jq ${jq_version} >= required ($min_jq )"
264
264
fi
265
265
fi
266
- echo " " 1>&2
266
+ echo -e " \n "
267
267
echo " Connect $hostname :$port OK (v$version )"
0 commit comments