File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,18 +78,24 @@ echo "Restoring GitHub Pages ..."
7878ghe-restore-pages-${GHE_BACKUP_STRATEGY} " $host " 1>&3
7979
8080echo " Restoring MySQL database ..."
81- ghe-ssh " $host " -- ' sudo ghe-service-ensure-mysql' 1>&3
81+ if [ " $GHE_VERSION_MAJOR " -gt 1 ]; then
82+ ghe-ssh " $host " -- ' sudo ghe-service-ensure-mysql' 1>&3
83+ fi
8284gzip -dc " $GHE_RESTORE_SNAPSHOT_PATH /mysql.sql.gz" | ghe-ssh " $host " -- ' ghe-import-mysql' 1>&3
8385
8486echo " Restoring Redis database ..."
85- ghe-ssh " $host " -- ' sudo ghe-service-ensure-redis' 1>&3
87+ if [ " $GHE_VERSION_MAJOR " -gt 1 ]; then
88+ ghe-ssh " $host " -- ' sudo ghe-service-ensure-redis' 1>&3
89+ fi
8690ghe-ssh " $host " -- ' ghe-import-redis' < " $GHE_RESTORE_SNAPSHOT_PATH /redis.rdb" 1>&3
8791
8892echo " Restoring SSH authorized keys ..."
8993ghe-ssh " $host " -- ' ghe-import-authorized-keys' < " $GHE_RESTORE_SNAPSHOT_PATH /authorized-keys.json" 1>&3
9094
9195echo " Restoring Elasticsearch indices ..."
92- ghe-ssh " $host " -- ' sudo ghe-service-ensure-elasticsearch' 1>&3
96+ if [ " $GHE_VERSION_MAJOR " -gt 1 ]; then
97+ ghe-ssh " $host " -- ' sudo ghe-service-ensure-elasticsearch' 1>&3
98+ fi
9399ghe-restore-es-${GHE_BACKUP_STRATEGY} " $host " 1>&3
94100
95101echo " Restoring SSH host keys ..."
You can’t perform that action at this time.
0 commit comments