Skip to content

Commit 0efa803

Browse files
committed
remove hookshot backup/restore
1 parent edec3fa commit 0efa803

7 files changed

Lines changed: 5 additions & 45 deletions

File tree

bin/ghe-backup

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,6 @@ if [ "$GHE_VERSION_MAJOR" -ge 2 ]; then
123123
echo "Backing up asset attachments ..."
124124
ghe-backup-userdata alambic_assets ||
125125
failures="$failures alambic_assets"
126-
127-
echo "Backing up hook deliveries ..."
128-
ghe-backup-userdata hookshot ||
129-
failures="$failures hookshot"
130126
fi
131127

132128
echo "Backing up Elasticsearch indices ..."

bin/ghe-restore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,6 @@ ghe-restore-pages-${GHE_BACKUP_STRATEGY} "$GHE_HOSTNAME" 1>&3
194194
if [ "$GHE_VERSION_MAJOR" -ge 2 ]; then
195195
echo "Restoring asset attachments ..."
196196
ghe-restore-userdata alambic_assets "$GHE_HOSTNAME" 1>&3
197-
198-
echo "Restoring hook deliveries ..."
199-
ghe-restore-userdata hookshot "$GHE_HOSTNAME" 1>&3
200197
fi
201198

202199
echo "Restoring MySQL database ..."

share/github-backup-utils/ghe-backup-repositories-rsync

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,9 @@ rsync_repository_data -H <<RULES
247247
RULES
248248

249249
# Sync __special__ data directories, including the __alambic_assets__,
250-
# __hookshot__, and __purgatory__ directories. The __nodeload_archives__,
250+
# and __purgatory__ directories. The __nodeload_archives__,
251251
# __gitmon__, and __render__ directories are excludes since they act only as
252-
# caches.
252+
# caches. The __hookshot__ directory is also excluded since it only contains log files.
253253
#
254254
# Under v2.x and greater, only the special __purgatory__ directory remains under
255255
# /data/repositories. All other special user data directories have been moved under
@@ -260,6 +260,7 @@ rsync_repository_data <<RULES
260260
- /__nodeload_archives__/
261261
- /__gitmon__/
262262
- /__render__/
263+
- /__hookshot__/
263264
+ /__*__/
264265
+ /__*__/**
265266
+ /info/

share/github-backup-utils/ghe-backup-userdata

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#/ Usage: ghe-backup-userdata <dirname>
33
#/ Take an online, incremental snapshot of a user data directory. This is used
44
#/ for a number of different simple datastores kept under /data/user on the
5-
#/ remote appliance, including: hookshot, alambic_assets, and pages data.
5+
#/ remote appliance, including alambic_assets and pages data.
66
set -e
77

88
# Bring in the backup configuration

share/github-backup-utils/ghe-restore-userdata

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#/ Usage: ghe-restore-userdata <dirname> <host>
33
#/ Restore a special user data directory via rsync. This is used
44
#/ for a number of different simple datastores kept under /data/user on the
5-
#/ remote appliance, including: hookshot, alambic_assets, and pages data.
5+
#/ remote appliance, including alambic_assets and pages data.
66
set -e
77

88
# Bring in the backup configuration

test/test-ghe-backup.sh

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,6 @@ touch alice/index.html bob/index.html
1717
mkdir -p "$GHE_REMOTE_DATA_USER_DIR/common"
1818
echo "fake password hash data" > "$GHE_REMOTE_DATA_USER_DIR/common/manage-password"
1919

20-
# Create some fake hookshot data in the remote data directory
21-
if [ "$GHE_VERSION_MAJOR" -ge 2 ]; then
22-
mkdir -p "$GHE_REMOTE_DATA_USER_DIR/hookshot"
23-
cd "$GHE_REMOTE_DATA_USER_DIR/hookshot"
24-
mkdir -p repository-123 repository-456
25-
touch repository-123/test.bpack repository-456/test.bpack
26-
fi
27-
2820
# Create some fake alambic data in the remote data directory
2921
if [ "$GHE_VERSION_MAJOR" -ge 2 ]; then
3022
mkdir -p "$GHE_REMOTE_DATA_USER_DIR/alambic_assets/github-enterprise-assets/0000"
@@ -117,9 +109,6 @@ begin_test "ghe-backup first snapshot"
117109
fi
118110

119111
if [ "$GHE_VERSION_MAJOR" -ge 2 ]; then
120-
# verify all hookshot user data was transferred
121-
diff -ru "$GHE_REMOTE_DATA_USER_DIR/hookshot" "$GHE_DATA_DIR/current/hookshot"
122-
123112
# verify all alambic assets user data was transferred
124113
diff -ru "$GHE_REMOTE_DATA_USER_DIR/alambic_assets" "$GHE_DATA_DIR/current/alambic_assets"
125114
fi
@@ -189,9 +178,6 @@ begin_test "ghe-backup subsequent snapshot"
189178
fi
190179

191180
if [ "$GHE_VERSION_MAJOR" -ge 2 ]; then
192-
# verify all hookshot user data was transferred
193-
diff -ru "$GHE_REMOTE_DATA_USER_DIR/hookshot" "$GHE_DATA_DIR/current/hookshot"
194-
195181
# verify all alambic assets user data was transferred
196182
diff -ru "$GHE_REMOTE_DATA_USER_DIR/alambic_assets" "$GHE_DATA_DIR/current/alambic_assets"
197183
fi

test/test-ghe-restore.sh

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@ mkdir -p gh-enterprise-es/node/0
1818
touch gh-enterprise-es/node/0/stuff1
1919
touch gh-enterprise-es/node/0/stuff2
2020

21-
# Create some fake hookshot data in the remote data directory
22-
if [ "$GHE_VERSION_MAJOR" -ge 2 ]; then
23-
mkdir -p "$GHE_DATA_DIR/1/hookshot"
24-
cd "$GHE_DATA_DIR/1/hookshot"
25-
mkdir -p repository-123 repository-456
26-
touch repository-123/test.bpack repository-456/test.bpack
27-
fi
28-
2921
# Create some fake alambic data in the remote data directory
3022
if [ "$GHE_VERSION_MAJOR" -ge 2 ]; then
3123
mkdir -p "$GHE_DATA_DIR/1/alambic_assets/github-enterprise-assets/0000"
@@ -115,9 +107,6 @@ begin_test "ghe-restore into configured vm"
115107
diff -ru "$GHE_DATA_DIR/current/pages" "$GHE_REMOTE_DATA_USER_DIR/pages"
116108

117109
if [ "$GHE_VERSION_MAJOR" -ge 2 ]; then
118-
# verify all hookshot user data was transferred
119-
diff -ru "$GHE_DATA_DIR/current/hookshot" "$GHE_REMOTE_DATA_USER_DIR/hookshot"
120-
121110
# verify all alambic assets user data was transferred
122111
diff -ru "$GHE_DATA_DIR/current/alambic_assets" "$GHE_REMOTE_DATA_USER_DIR/alambic_assets"
123112
fi
@@ -224,9 +213,6 @@ begin_test "ghe-restore -c into unconfigured vm"
224213
diff -ru "$GHE_DATA_DIR/current/pages" "$GHE_REMOTE_DATA_USER_DIR/pages"
225214

226215
if [ "$GHE_VERSION_MAJOR" -ge 2 ]; then
227-
# verify all hookshot user data was transferred
228-
diff -ru "$GHE_DATA_DIR/current/hookshot" "$GHE_REMOTE_DATA_USER_DIR/hookshot"
229-
230216
# verify all alambic assets user data was transferred
231217
diff -ru "$GHE_DATA_DIR/current/alambic_assets" "$GHE_REMOTE_DATA_USER_DIR/alambic_assets"
232218
fi
@@ -280,9 +266,6 @@ begin_test "ghe-restore into unconfigured vm"
280266
# verify all pages data was transferred to the restore location
281267
diff -ru "$GHE_DATA_DIR/current/pages" "$GHE_REMOTE_DATA_USER_DIR/pages"
282268

283-
# verify all hookshot user data was transferred
284-
diff -ru "$GHE_DATA_DIR/current/hookshot" "$GHE_REMOTE_DATA_USER_DIR/hookshot"
285-
286269
# verify all alambic assets user data was transferred
287270
diff -ru "$GHE_DATA_DIR/current/alambic_assets" "$GHE_REMOTE_DATA_USER_DIR/alambic_assets"
288271

@@ -326,9 +309,6 @@ begin_test "ghe-restore with host arg"
326309
diff -ru "$GHE_DATA_DIR/current/pages" "$GHE_REMOTE_DATA_USER_DIR/pages"
327310

328311
if [ "$GHE_VERSION_MAJOR" -ge 2 ]; then
329-
# verify all hookshot user data was transferred
330-
diff -ru "$GHE_DATA_DIR/current/hookshot" "$GHE_REMOTE_DATA_USER_DIR/hookshot"
331-
332312
# verify all alambic assets user data was transferred
333313
diff -ru "$GHE_DATA_DIR/current/alambic_assets" "$GHE_REMOTE_DATA_USER_DIR/alambic_assets"
334314
fi

0 commit comments

Comments
 (0)