File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -177,10 +177,11 @@ if [ "$GHE_VERSION_MAJOR" -ge 2 ]; then
177177 ghe-ssh " $GHE_HOSTNAME " -- /bin/sh 1>&3
178178fi
179179
180- echo " Restoring Git repositories ..."
181180# Remove temporary 2.2 storage migration directory if it exists
182181echo " if [ -d /data/user/repositories-nw-backup ]; then sudo rm -rf /data/user/repositories-nw-backup; fi" |
183182ghe-ssh " $GHE_HOSTNAME " -- /bin/sh 1>&3
183+
184+ echo " Restoring Git repositories ..."
184185ghe-restore-repositories-${GHE_BACKUP_STRATEGY} " $GHE_HOSTNAME " 1>&3
185186
186187echo " Restoring GitHub Pages ..."
@@ -206,6 +207,13 @@ ghe-ssh "$GHE_HOSTNAME" -- 'ghe-import-authorized-keys' < "$GHE_RESTORE_SNAPSHOT
206207echo " Restoring Elasticsearch indices ..."
207208ghe-restore-es-${GHE_BACKUP_STRATEGY} " $GHE_HOSTNAME " 1>&3
208209
210+ # Restart an already running memcached to reset the cache after restore
211+ if [ " $GHE_VERSION_MAJOR " -ge 2 ]; then
212+ echo " Restarting memcached ..." 1>&3
213+ echo " sudo restart -q memcached 2>/dev/null || true" |
214+ ghe-ssh " $GHE_HOSTNAME " -- /bin/sh
215+ fi
216+
209217# When restoring to a host that has already been configured, kick off a
210218# config run to perform data migrations.
211219if $instance_configured ; then
You can’t perform that action at this time.
0 commit comments