Ad Widget

Collapse

upgrade 1.8 to 2.0 and import data.sql?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dale
    Junior Member
    • Oct 2011
    • 26

    #1

    upgrade 1.8 to 2.0 and import data.sql?

    I'm working on a upgrade from 1.8 to 2.0 and simultaneous migration from MySQL to PostgreSQL. I'll post a howto when I'm done. It's pretty close.

    I was able to import the 2.0 images.sql no problem. Nice new icons! Now I would like to integrate the new data.sql to gain the new templates and other 2.0 defaults.

    However, the primary keys clash, so I would have to script an update of my old data to move out of the way. Anyone written such a script? I'm not sure it's worth all that effort, but I wonder how the 2.0.x auto-schema updates would react if the contents of data.sql were not loaded.

    It would be nice if there was a data.sql that would intelligently update instead of just insert. I guess that's the goal of the 2.0.x schema updates?

    Will 2.0.x upgrades fail if I carry forward my upgraded 1.8 database without loading the 2.0 data.sql?
  • dale
    Junior Member
    • Oct 2011
    • 26

    #2
    Looking a bit closer, there are new tables in 2.0 which will be empty if data.sql is not loaded. For example at least item_discovery, expressions, regexps.

    So it seems this does need to be resolved. How are other upgraders dealing with this?

    FWIW, I already decided to abandon my history to make this upgrade easier.

    Code:
    Data.sql inserts into the following tables (awk '/^INSERT/ {print $3}' < /usr/share/zabbix-postgresql/data.sql | sort -u ):
    
        actions
        applications
        conditions
        config
        dchecks
        drules
        expressions
        functions
        globalmacro
        graphs
        graphs_items
        graph_theme
        groups
        help_items
        hosts
        hosts_groups
        hosts_templates
        interface
        item_discovery
        items
        items_applications
        mappings
        media_type
        operations
        opgroup
        opmessage
        opmessage_grp
        optemplate
        regexps
        screens
        screens_items
        scripts
        sysmaps
        sysmaps_elements
        trigger_depends
        triggers
        users
        users_groups
        usrgrp
        valuemaps

    Comment

    Working...