Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restart memcached after restoring #130

Merged
merged 4 commits into from
May 14, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion bin/ghe-restore
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,11 @@ if [ "$GHE_VERSION_MAJOR" -ge 2 ]; then
ghe-ssh "$GHE_HOSTNAME" -- /bin/sh 1>&3
fi

echo "Restoring Git repositories ..."
# Remove temporary 2.2 storage migration directory if it exists
echo "if [ -d /data/user/repositories-nw-backup ]; then sudo rm -rf /data/user/repositories-nw-backup; fi" |
ghe-ssh "$GHE_HOSTNAME" -- /bin/sh 1>&3

echo "Restoring Git repositories ..."
ghe-restore-repositories-${GHE_BACKUP_STRATEGY} "$GHE_HOSTNAME" 1>&3

echo "Restoring GitHub Pages ..."
Expand All @@ -206,6 +207,13 @@ ghe-ssh "$GHE_HOSTNAME" -- 'ghe-import-authorized-keys' < "$GHE_RESTORE_SNAPSHOT
echo "Restoring Elasticsearch indices ..."
ghe-restore-es-${GHE_BACKUP_STRATEGY} "$GHE_HOSTNAME" 1>&3

# Restart an already running memcached to reset the cache after restore
if [ "$GHE_VERSION_MAJOR" -ge 2 ]; then
echo "Restarting memcached ..." 1>&3
echo "sudo restart -q memcached 2>/dev/null || true" |
ghe-ssh "$GHE_HOSTNAME" -- /bin/sh
fi

# When restoring to a host that has already been configured, kick off a
# config run to perform data migrations.
if $instance_configured; then
Expand Down