@@ -54,38 +54,7 @@ export CALLING_SCRIPT="ghe-backup"
54
54
# shellcheck source=share/github-backup-utils/ghe-backup-config
55
55
. " $( dirname " ${BASH_SOURCE[0]} " ) /../share/github-backup-utils/ghe-backup-config"
56
56
57
- # Setup progress tracking
58
- init-progress
59
- export PROGRESS_TOTAL=14 # Minimum number of steps in backup is 14
60
- echo " $PROGRESS_TOTAL " > /tmp/backup-utils-progress-total
61
- export PROGRESS_TYPE=" Backup"
62
- echo " $PROGRESS_TYPE " > /tmp/backup-utils-progress-type
63
- export PROGRESS=0 # Used to track progress of backup
64
- echo " $PROGRESS " > /tmp/backup-utils-progress
65
-
66
- OPTIONAL_STEPS=0
67
- # Backup actions+mssql
68
- if ghe-ssh " $GHE_HOSTNAME " -- ' ghe-config --true app.actions.enabled' ; then
69
- OPTIONAL_STEPS=$(( OPTIONAL_STEPS + 2 ))
70
- fi
71
-
72
- # Backup fsck
73
- if [ " $GHE_BACKUP_FSCK " = " yes" ]; then
74
- OPTIONAL_STEPS=$(( OPTIONAL_STEPS + 1 ))
75
- fi
76
-
77
- # Backup minio
78
- if ghe-ssh " $GHE_HOSTNAME " -- ' ghe-config --true app.minio.enabled' ; then
79
- OPTIONAL_STEPS=$(( OPTIONAL_STEPS + 1 ))
80
- fi
81
57
82
- # Backup pages
83
- if [ " $GHE_BACKUP_PAGES " != " no" ]; then
84
- OPTIONAL_STEPS=$(( OPTIONAL_STEPS + 1 ))
85
- fi
86
-
87
- PROGRESS_TOTAL=$(( OPTIONAL_STEPS + PROGRESS_TOTAL)) # Minimum number of steps in backup is 14
88
- echo " $PROGRESS_TOTAL " > /tmp/backup-utils-progress-total
89
58
# Check to make sure moreutils parallel is installed and working properly
90
59
ghe_parallel_check
91
60
186
155
# Perform a host connection check and establish the remote appliance version.
187
156
# The version is available in the GHE_REMOTE_VERSION variable and also written
188
157
# to a version file in the snapshot directory itself.
158
+ # ghe_remote_version_required should be run before any other instances of ghe-ssh
159
+ # to ensure that there are no problems with host key verification.
189
160
ghe_remote_version_required
190
161
echo " $GHE_REMOTE_VERSION " > version
191
162
163
+ # Setup progress tracking
164
+ init-progress
165
+ export PROGRESS_TOTAL=14 # Minimum number of steps in backup is 14
166
+ echo " $PROGRESS_TOTAL " > /tmp/backup-utils-progress-total
167
+ export PROGRESS_TYPE=" Backup"
168
+ echo " $PROGRESS_TYPE " > /tmp/backup-utils-progress-type
169
+ export PROGRESS=0 # Used to track progress of backup
170
+ echo " $PROGRESS " > /tmp/backup-utils-progress
171
+
172
+ OPTIONAL_STEPS=0
173
+ # Backup actions+mssql
174
+ if ghe-ssh " $GHE_HOSTNAME " -- ' ghe-config --true app.actions.enabled' ; then
175
+ OPTIONAL_STEPS=$(( OPTIONAL_STEPS + 2 ))
176
+ fi
177
+
178
+ # Backup fsck
179
+ if [ " $GHE_BACKUP_FSCK " = " yes" ]; then
180
+ OPTIONAL_STEPS=$(( OPTIONAL_STEPS + 1 ))
181
+ fi
182
+
183
+ # Backup minio
184
+ if ghe-ssh " $GHE_HOSTNAME " -- ' ghe-config --true app.minio.enabled' ; then
185
+ OPTIONAL_STEPS=$(( OPTIONAL_STEPS + 1 ))
186
+ fi
187
+
188
+ # Backup pages
189
+ if [ " $GHE_BACKUP_PAGES " != " no" ]; then
190
+ OPTIONAL_STEPS=$(( OPTIONAL_STEPS + 1 ))
191
+ fi
192
+
193
+ PROGRESS_TOTAL=$(( OPTIONAL_STEPS + PROGRESS_TOTAL)) # Minimum number of steps in backup is 14
194
+ echo " $PROGRESS_TOTAL " > /tmp/backup-utils-progress-total
195
+
192
196
# check that incremental settings are valid if set
193
197
is_inc=$( is_incremental_backup_feature_on)
194
198
0 commit comments