Ad Widget

Collapse

Zabbix DB upgrade from v3 to v6

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tekigw
    Junior Member
    • Mar 2025
    • 4

    #1

    Zabbix DB upgrade from v3 to v6

    Hello all, I need a little bit of your wisdom.

    I've got a task to upgrade Zabbix from version 3 to version 6 and migrate it to the cloud. I've created a replica of the current production monitoring server, upgraded Ubuntu from 14 to 18, upgraded MySQL from 5 to 8, imported the old Zabbix database, and upgraded Zabbix from version 3 to 6. However, for some reason, the upgrade didn't update the database version, so now I need to do it manually.

    I found out that I can't upgrade it directly from 3 to 6; I need to do it step by step—from 3 to 4, then to 5, and finally to 6. I tried cloning the Git repository (https://git.zabbix.com/scm/zbx/zabbix.git) to use the scripts from zabbix/database/mysql/upgrade, but I didn’t find the SQL scripts there. I also couldn't find any information about this in the documentation.

    Could you please help me?
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    Originally posted by Tekigw
    I've got a task to upgrade Zabbix from version 3 to version 6 and migrate it to the cloud. I've created a replica of the current production monitoring server, upgraded Ubuntu from 14 to 18, upgraded MySQL from 5 to 8, imported the old Zabbix database, and upgraded Zabbix from version 3 to 6. However, for some reason, the upgrade didn't update the database version, so now I need to do it manually.
    You should never need to upgrade the database manually. It's possible, but it's not how the product is designed and you would have to have a very deep understanding of each schema change.

    When you started zabbix_server version 6.0.x on the replica, it should have connected to the database and started applying a lot of upgrades. Are there log messages in /var/log/zabbix/zabbix_server.log about any particular upgrade that failed?

    Originally posted by Tekigw
    I found out that I can't upgrade it directly from 3 to 6; I need to do it step by step—from 3 to 4, then to 5, and finally to 6.
    That's incorrect. You absolutely can upgrade directly from 3.0.x LTS to 6.0.x LTS.

    The complicated part about making a huge version leap is that you have to read all of the upgrade documentation not just for version 6.0.x, but for every release between 3.0.x and 6.0.x: https://www.zabbix.com/documentation.../debian_ubuntu

    It can sometimes be less intimidating to break the upgrade into steps. Since you're upgrading a duplicate system, not the original, you can reset the database to an empty database on the new system and re-try your upgrade after you figure out why the upgrade failed in the first place.

    Originally posted by Tekigw
    I tried cloning the Git repository (https://git.zabbix.com/scm/zbx/zabbix.git) to use the scripts from zabbix/database/mysql/upgrade, but I didn’t find the SQL scripts there. I also couldn't find any information about this in the documentation.
    You didn't find them because they don't exist, at least in the form you're looking for. The upgrades aren't in a bunch of SQL files, they're in C code using a bunch of upgrade helper functions.

    Manual upgrade of the database is not how the product is designed.

    Comment

    • Tekigw
      Junior Member
      • Mar 2025
      • 4

      #3
      Yes, I agree that I would have to have a deep understanding, but I don't. Actually I didn't work with zabbix lower then version 6 and everything there are very "admin friendly", but unfortunately the situation is like "You should upgrade and migrate, here is a server, have fun". So I'm trying to find a solution.

      Maybe there is a way to just set up a new zabbix server and then import there old monitoring in some way?

      Comment

      Working...