• Prerequisite:

    During the upgrade of ZStack, the core files and database of the current ZStack are backed up to the corresponding directory by default.

  • Procedure:
    1. Back up the core files in ZStack of the previous version.
      cp /usr/local/zstack/upgrade/2017-11-09-15-41-52 /root -r
    2. Back up the database of the previous version.
      cp /usr/local/zstack/db_backup/2017-11-09-15-42-43/backup.sql /root
    3. Back up the database again.
      zstack-ctl dump_mysql
    4. Delete the current ZStack environment.
      zstack-ctl stop
      rm -rf /usr/local/zstack
    5. Use the previous installation package to directly install ZStack.
      bash ZStack-installer-3.10.0.bin -D
    6. Perform recovery by using the core files backed up in Step 1.
      zstack-ctl stop
      mv /usr/local/zstack/apache-tomcat/webapps/zstack /usr/local/zstack/apache-tomcat/webapps/zstack-bk
      cp /root/2017-11-09-15-41-52/zstack /usr/local/zstack/apache-tomcat/webapps  -r
      chown zstack:zstack /usr/local/zstack/apache-tomcat/webapps/zstack -R
    7. Restore the database backed up in Step 2.
      cat /root/backup.sql |mysql -u root -p zstack.mysql.password zstack
    8. Start the ZStack management node service. Then, ZStack is successfully restored to the previous version.
      zstack-ctl start