Skip to content

Commit 853ec7c

Browse files
committed
More formatting
1 parent b996dab commit 853ec7c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

bin/ghe-host-check

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,7 @@ if [[ "$CALLING_SCRIPT" == "ghe-backup" ]]; then
159159
#Display dir requirements for repositories and mysql
160160
echo "Checking host for sufficient space for a backup..." 1>&2
161161
available_space=$(df -B 1k $GHE_DATA_DIR | awk 'END{printf "%.0f", $4 * 1024}')
162-
echo -e "Available space: $((available_space / (1024 ** 2))) MB\n" 1>&2
163-
echo -e "We recommend allocating at least 5x the amount of storage allocated to the primary GitHub appliance for historical snapshots and growth over time.\n" 1>&2
162+
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
164163

165164
repos_disk_size=$(transfer_size repositories /tmp)
166165
pages_disk_size=$(transfer_size pages /tmp)
@@ -172,6 +171,8 @@ if [[ "$CALLING_SCRIPT" == "ghe-backup" ]]; then
172171
mssql_disk_size=$(transfer_size mssql /tmp)
173172

174173
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))
174+
echo "Available space: $((available_space / (1024 ** 2))) MB" 1>&2
175+
echo -e "Min Disk required for this backup is at least $min_disk_req MB\n" 1>&2
175176

176177
cat <<DATA_TRANSFER_SIZE 1>&2
177178
### Data Transfer Sizes
@@ -184,14 +185,14 @@ mysql: $mysql_disk_size MB
184185
actions: $actions_disk_size MB
185186
mssql: $mssql_disk_size MB
186187
DATA_TRANSFER_SIZE
187-
printf "min_disk_required for this backup is at least %d MB\n" "$min_disk_req" 1>&2
188188

189189
if [[ $available_space -lt $min_disk_req ]]; then
190190
echo "There is not enough disk space for the backup. Please allocate more space and continue." 1>&2
191191
exit 1
192192
fi
193193

194194
#Check rsync, openssh & jq versions
195+
echo "### Software versions" 1>&2
195196
rsync_version=$(rsync --version | grep 'version' | awk '{print $3}')
196197
if awk "BEGIN {exit !($rsync_version < $min_rsync)}" &> /dev/null; then
197198
echo "rsync version $rsync_version in backup-host does not meet minimum requirements." 1>&2

0 commit comments

Comments
 (0)