Skip to content

Commit c3ad878

Browse files
authored
Merge pull request #574 from github/stable
Merge stable into master to sync branches
2 parents 4ff376b + d50d94d commit c3ad878

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

bin/ghe-backup

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,25 @@ if [ "$(ls -il dest1/testfile | awk '{ print $1 }')" != "$(ls -il dest2/testfile
8181
fi
8282
rm -rf src dest1 dest2
8383

84+
# if we should use gitbackups to backup repositories
85+
should_use_gitbackups_for_repositories(){
86+
ghe-ssh "$GHE_HOSTNAME" ghe-config --true "app.github.gitbackups"
87+
}
88+
89+
# check that the appliance supports using gitbackups for repositories
90+
can_use_gitbackups_for_repositories(){
91+
ghe-ssh "$GHE_HOSTNAME" test -e /data/github/current/bin/ghe-backup-repositories
92+
}
93+
94+
# Exit early if the appliance is missing script to backup repositories using gitbackups
95+
if should_use_gitbackups_for_repositories; then
96+
if ! can_use_gitbackups_for_repositories; then
97+
echo "Error: Configuration setting 'app.github.gitbackups' is enabled but this version of GHES cannot use gitbackups to back up repositories via 'ghe-backup'."
98+
echo "Disable configuration setting 'app.github.gitbackups' and re-run 'ghe-backup' to use rsync."
99+
exit 1
100+
fi
101+
fi
102+
84103
# To prevent multiple backup runs happening at the same time, we create a
85104
# in-progress file with the timestamp and pid of the backup process,
86105
# giving us a form of locking.

debian/changelog

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
1+
github-backup-utils (2.19.4) UNRELEASED; urgency=medium
2+
3+
* Fix the way we connect to mysql master using ssh forwarding for binary backups #567
4+
5+
-- Hao Jiang <[email protected]> Tue, 18 Feb 2020 17:54:31 +0000
6+
17
github-backup-utils (2.20.0) UNRELEASED; urgency=medium
28

39
* Fix `ghe-backup-repositories` performance for large instances #541
410
* Fix two issues with binary backup (slow gzip compression and support for restore from instances other than SQL master) #551
511

612
-- Alejandro Figueroa <[email protected]> Tue, 11 Feb 2020 20:47:17 +0000
713

14+
github-backup-utils (2.19.3) UNRELEASED; urgency=medium
15+
16+
* Fix two issues with binary backup (slow gzip compression and support for restore from instances other than SQL master) #551
17+
18+
-- Hao Jiang <[email protected]> Tue, 11 Feb 2020 19:31:55 +0000
19+
820
github-backup-utils (2.19.2) UNRELEASED; urgency=medium
921

1022
* Fix `ghe-backup-repositories` performance for large instances #541
@@ -236,7 +248,7 @@ github-backup-utils (2.7.1) UNRELEASED; urgency=medium
236248

237249
github-backup-utils (2.7.0) UNRELEASED; urgency=medium
238250

239-
* GitHub Enterprise 2.7.0 support
251+
* GitHub Enterprise 2.7.0 support
240252

241253
-- Sergio Rubio <[email protected]> Wed, 03 Aug 2016 20:25:31 +0200
242254

0 commit comments

Comments
 (0)