Ad Widget

Collapse

Expected downtime for database conversion?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pmed
    Junior Member
    • Sep 2019
    • 5

    #1

    Expected downtime for database conversion?

    We've been running zabbix 2.2 for some time now :-}
    Looking to upgrade to 4.2. But a sentence in the upgrade docs made me pause:

    "Depending on database size the database upgrade to version 4.2 may take a long time."

    Could someone help us out with estimating just how long, "a long time" will be?
    Length of downtime for our monitoring system is actually important to us.

  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    - create slave database
    - detach that database from master
    - use that copy of the database instance with zabbix server process started on some location
    As result you will have nit esrimation but quite precise time of the upgrade.
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment

    • pmed
      Junior Member
      • Sep 2019
      • 5

      #3
      here's the circle-back for what actually happened.
      The upgrade was a success. yay!l
      total elapsed time to migrate approximately 12,000,000 records: around 3-4 hours.
      half of that was debugging time, however.
      The upgrade failed at multiple steps along the way.
      3 of them were failures because the old tables were "partitioned", and the ugprade process wanted to add a primary key.
      (for example, create primary key "eventid", on the events table)

      from this post,
      https://www.zabbix.com/forum/zabbix-...uplicate-entry

      I found out that the magic is

      Code:
      alter table events drop key eventid;
      alter table events remove partitioning;
      alter table events add constraint primary key (eventid);
      had to do that basic same thing with two other tables.

      However, ADDITIONALLY, in the upgrade to 3.0, there was the problem that the eventids WERE NOT UNIQUE! there were many events that had a shared eventid across multiple objectid records. had to just throw those away.

      Comment

      Working...