Skip to content

Commit 94ecea6

Browse files
authored
Merge branch 'master' into djdefi-rsync-bumperfix
2 parents c69ac4e + dd119e9 commit 94ecea6

File tree

5 files changed

+17
-0
lines changed

5 files changed

+17
-0
lines changed

bin/ghe-backup

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ cleanup () {
121121

122122
# Cleanup SSH multiplexing
123123
ghe-ssh --clean
124+
125+
bm_end "$(basename $0)"
124126
}
125127

126128
# Setup exit traps
@@ -216,6 +218,7 @@ fi
216218
echo "$GHE_SNAPSHOT_TIMESTAMP $$" > ../in-progress
217219
echo "$GHE_SNAPSHOT_TIMESTAMP $$" > "${GHE_DATA_DIR}/in-progress-backup"
218220

221+
bm_start "$(basename $0)"
219222
START_TIME=$(date +%s)
220223
log_info "Starting backup of $GHE_HOSTNAME with backup-utils v$BACKUP_UTILS_VERSION in snapshot $GHE_SNAPSHOT_TIMESTAMP"
221224

bin/ghe-host-check

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,13 @@ SKIP_MSG
168168
# shellcheck source=share/github-backup-utils/ghe-rsync-size
169169
. "$(dirname "${BASH_SOURCE[0]}")/../share/github-backup-utils/ghe-rsync-size"
170170

171+
#Check if GHE_DATA_DIR is NFS mounted
172+
fs_info=$(stat -f -c "%T" "$GHE_DATA_DIR") || true
173+
if [ "$fs_info" == "nfs" ]; then
174+
echo "Warning: NFS (Network File System) detected for $GHE_DATA_DIR" 1>&2
175+
echo "Please review https://gh.io/backup-utils-storage-requirements for details." 1>&2
176+
fi
177+
171178
#Display dir requirements for repositories and mysql
172179
echo "" 1>&2
173180
echo "Checking host for sufficient space for a backup..." 1>&2

bin/ghe-restore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ cleanup () {
138138
if ! rm -f "${GHE_DATA_DIR}/in-progress-restore"; then
139139
log_error "Failed to remove in-progress file" 1>&3
140140
fi
141+
142+
bm_end "$(basename $0)"
141143
}
142144

143145
# This function's type definition is being passed to a remote host via `ghe-ssh` but is not used locally.
@@ -322,6 +324,7 @@ export PROGRESS=0 # Used to track progress of restore
322324
echo "$PROGRESS" > /tmp/backup-utils-progress/progress
323325

324326
# Log restore start message locally and in /var/log/syslog on remote instance
327+
bm_start "$(basename $0)"
325328
START_TIME=$(date +%s)
326329
log_info "Starting restore of $GHE_HOSTNAME with backup-utils v$BACKUP_UTILS_VERSION from snapshot $GHE_RESTORE_SNAPSHOT"
327330

docs/requirements.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ Using a [case sensitive][7] file system is also required to avoid conflicts.
5757

5858
Performance of backup and restore operations are also dependent on the backup host's storage. We recommend using a high performance storage system with low latency and high IOPS.
5959

60+
Please avoid using an NFS mount for the data directory (where backup data is stored) as this can cause performance issues and timeouts during backups.
61+
6062
## GitHub Enterprise Server version requirements
6163

6264
Starting with Backup Utilities v2.13.0, version support is inline with that of the

test/testlib.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ setup_remote_metadata () {
8787
mkdir -p "$GHE_REMOTE_DATA_DIR" "$GHE_REMOTE_DATA_USER_DIR"
8888
mkdir -p "$GHE_REMOTE_DATA_USER_DIR/common"
8989
mkdir -p "$GHE_REMOTE_ROOT_DIR/etc/github"
90+
# Create fake remote repositories dir
91+
mkdir -p "$GHE_REMOTE_DATA_USER_DIR/repositories"
9092
}
9193
setup_remote_metadata
9294

0 commit comments

Comments
 (0)