Ad Widget

Collapse

Restore zabbix after a a faild upgrade to 5.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hsv
    Junior Member
    • Jun 2020
    • 14

    #1

    Restore zabbix after a a faild upgrade to 5.0

    Hi

    I have a backup from my Zabbix 4.4 installation I try to re-install again.

    I have tried to install a new server with ubuntu 18.04 as the old server and installer a new Zabbix 4.4 based on the notes I have from the old server. So it is setup the same way.

    Now I copy the old database back to the new server and it gives no errors but it gives all kind of errors.
    sudo mysql -u'root' -p'Password' zabbix -e "set global innodb_strict_mode='OFF';"
    zcat /opt/zabbix-backup/zabbix-server-mysql/create.sql.gz | mysql -h localhost -u zabbix -p'Password' 'zabbix'
    sudo mysql -u'root' -p'Password' zabbix -e "set global innodb_strict_mode='ON';"


    But now the user Admin says it is a quest and I cannot login to see any think.
    The strang thonk is sometime it access Admin as administrator for some minuts and then it is guest again.

    Any idea how to get control with the server again

    What I am trying to do is to come in and get the configuration out of the server and build a new one.

    Regards
    Henning
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    Do not run the following commands when upgrading.
    Code:
    zcat /opt/zabbix-backup/zabbix-server-mysql/create.sql.gz | mysql -h localhost -u zabbix -p'Password' 'zabbix'
    If you have a running database loaded with an earlier version of data, you can simply connect the Zabbix server to that database and start it to automatically perform the database upgrade process.

    Comment


    • hsv
      hsv commented
      Editing a comment
      Thanks for the replay.

      I have now build a new Zabbix 50 server, with this method on a Ubuntu 20.04
      wget https://repo.zabbix.com/zabbix/5.0/u...+focal_all.deb
      sudo dpkg -i zabbix-release_5.0-1+focal_all.deb
      sudo apt update
      sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-agent

      sudo systemctl stop zabbix-server

      sudo mysql -uroot -p
      password
      mysql> create database zabbix character set utf8 collate utf8_bin;
      mysql> create user zabbix@localhost identified by 'password';
      mysql> grant all privileges on zabbix.* to zabbix@localhost;
      mysql> quit;

      Now I try to import the old database, but have no succes.
      I have tried these 3 ways:
      MariaDB [(none)]> zabbix < /home/administrator/create44.sql.gz;
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'zabbix < /home/administrator/create.sql.gz' at line 1
      MariaDB [(none)]> zabbix < /home/administrator/create44.sql;
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'zabbix < /home/administrator/create44.sql' at line 1

      administrator@zabbix:~$ zcat /home/administrator/create44.sql.gz | mysql -h localhost -u zabbix -p'password' 'zabbix'
      ERROR 1118 (42000) at line 1284: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.

      Any suggestions how to get the old database imported into the new database?

      And was this they way you tried to describe?

      regards
      Henning
Working...