Skip to content

Commit 49c23f9

Browse files
committed
Use ghe-restore-userdata for restoring pages data
1 parent 6c71bcb commit 49c23f9

1 file changed

Lines changed: 2 additions & 19 deletions

File tree

libexec/ghe-restore-pages-rsync

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,5 @@ cd $(dirname "$0")/..
1313
# Show usage and bail with no arguments
1414
[ -z "$*" ] && print_usage
1515

16-
# Grab host arg
17-
host="$1"
18-
19-
# Perform a host-check and establish GHE_REMOTE_XXX variables.
20-
ghe_remote_version_required "$host"
21-
22-
# The snapshot to restore should be set by the ghe-restore command but this lets
23-
# us run this script directly.
24-
: ${GHE_RESTORE_SNAPSHOT:=current}
25-
26-
# Transfer all Pages data from the latest snapshot to the GitHub instance
27-
# in a single rsync invocation.
28-
if [ -d "$GHE_DATA_DIR/$GHE_RESTORE_SNAPSHOT/pages/" ]; then
29-
ghe-rsync -avz --delete \
30-
-e "ghe-ssh -p $(ssh_port_part "$host")" \
31-
--rsync-path="sudo -u git rsync" \
32-
"$GHE_DATA_DIR/$GHE_RESTORE_SNAPSHOT/pages/" \
33-
"$(ssh_host_part "$host"):$GHE_REMOTE_DATA_USER_DIR/pages" 1>&3
34-
fi
16+
# Restore all pages data via rsync
17+
ghe-restore-userdata pages "$1"

0 commit comments

Comments
 (0)