Ad Widget

Collapse

Old host running Zabbix 5.0.36 to new host running Zabbix 6.0.23

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 3l3m3nt
    Junior Member
    • Dec 2023
    • 2

    #1

    Old host running Zabbix 5.0.36 to new host running Zabbix 6.0.23

    Hi there,

    I'm moving Zabbix from an old host to a newer host. The older host was running Zabbix 5.0.36 with mysql.

    I've exported the db to the new host (took ages - 120gb db) where I had a newer version of Zabbix installed (6.0.23).

    Unfortunately it's failing the upgrade:

    31984:20231202:214749.156 database upgrade failed on patch 05010049, exiting in 10 seconds
    32008:20231202:214809.398 Starting Zabbix Server. Zabbix 6.0.23 (revision 315e9acac58).
    32008:20231202:214809.398 ****** Enabled features ******
    32008:20231202:214809.398 SNMP monitoring: YES
    32008:20231202:214809.398 IPMI monitoring: YES
    32008:20231202:214809.398 Web monitoring: YES
    32008:20231202:214809.398 VMware monitoring: YES
    32008:20231202:214809.398 SMTP authentication: YES
    32008:20231202:214809.398 ODBC: YES
    32008:20231202:214809.398 SSH support: YES
    32008:20231202:214809.398 IPv6 support: YES
    32008:20231202:214809.398 TLS support: YES
    32008:20231202:214809.398 ******************************
    32008:20231202:214809.398 using configuration file: /etc/zabbix/zabbix_server.conf
    32008:20231202:214809.436 current database version (mandatory/optional): 05010048/05010048
    32008:20231202:214809.436 required mandatory version: 06000000
    32008:20231202:214809.436 optional patches were found
    32008:20231202:214809.436 starting automatic database upgrade
    32008:20231202:214809.437 [Z3005] query failed: [1050] Table 'item_parameter' already exists [create tab
    `item_parameterid` bigint unsigned not null,
    `itemid` bigint unsigned not null,
    `name` varchar(255) default '' not null,
    `value` varchar(2048) default '' not null,
    primary key (item_parameterid)
    ) engine=innodb]
    32008:20231202:214809.437 database upgrade failed on patch 05010049, exiting in 10 seconds

    ​I thought I followed the guides correctly, but perhaps I've missed a step somewhere...

    Help appreciated.
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    Did you install your new instance together with all the DB creation etc? Drop that new DB... recreate your OLD DB in NEW instance... no tables/columns from new version should be seen. Then restart new server to upgrade everything you have in DB...

    Upgrade tasks expect your DB to be with all the old "format", they add needed things, convert where needed etc. But you should not import old data to new DB... Even if probably fits there...

    Comment

    • 3l3m3nt
      Junior Member
      • Dec 2023
      • 2

      #3
      Thanks for the post. I ended up having to remove version 6.0.23 from the new server, installing Zabbix 5.0.40. I then dropped the db, recreated it, then reimported the db from the old server. Once that was done, I then upgraded Zabbix from 5.0.40 back to 6.0.23 and the upgrade was successful.

      Comment

      Working...