File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,30 @@ if [ -n "$GHE_ALLOW_REPLICA_BACKUP" ]; then
155
155
echo " Warning: backing up a high availability replica may result in inconsistent or unreliable backups."
156
156
fi
157
157
158
+ # Output system information of the backup host
159
+
160
+ # If /etc/issue.net exists, use it to get the OS version
161
+ if [ -f /etc/issue.net ]; then
162
+ echo " Running on: $( cat /etc/issue.net) "
163
+ else
164
+ echo " Running on: Unknown OS"
165
+ fi
166
+
167
+ # If nproc command exists, use it to get the number of CPUs
168
+ if command -v nproc > /dev/null 2>&1 ; then
169
+ echo " CPUs: $( nproc) "
170
+ else
171
+ echo " CPUs: Unknown"
172
+ fi
173
+
174
+ # If the free command exists, use it to get the memory details
175
+ if command -v free > /dev/null 2>&1 ; then
176
+ echo " Memory $( free -m | grep ' ^Mem:' | awk ' {print "total/used/free+share/buff/cache: " $2 "/" $3 "/" $4 "+" $5 "/" $6 "/" $7}' ) "
177
+ else
178
+ echo " Memory: Unknown"
179
+ fi
180
+
181
+
158
182
# Log backup start message in /var/log/syslog on remote instance
159
183
ghe_remote_logger " Starting backup from $( hostname) with backup-utils v$BACKUP_UTILS_VERSION in snapshot $GHE_SNAPSHOT_TIMESTAMP ..."
160
184
You can’t perform that action at this time.
0 commit comments