Ad Widget

Collapse

Migrating data to new 6.0 install

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RoyK
    Junior Member
    • Jan 2016
    • 20

    #1

    Migrating data to new 6.0 install

    Hi all

    Now that 6.0 is out, I wonder how I can migrate existing data from a 5.0 install to the new 6.0. Usually, migrating to new templates isn't easy, that is, unless I have misunderstood something. The current setup has some 400 host and 37k items and keeping the historic data would be nice. Any idea how to do this?
  • tmoney29
    Junior Member
    • Feb 2022
    • 1

    #2
    I'm wondering about the same thing - want to forklift upgrade from 5.2 to 6.0 with a separate install

    Comment

    • Atsushi
      Senior Member
      • Aug 2013
      • 2028

      #3
      I don't know in what environment you are using Zabbix. If you are using an OS or DBMS that supports Zabbix 6.0 and you are using the official Zabbix package, you can upgrade by updating the Zabbix packages. And Zabbix server process will automatically perform the database upgrade process at startup.
      Make a backup before working so that you can recover from a failure.

      Comment

      • RoyK
        Junior Member
        • Jan 2016
        • 20

        #4
        Originally posted by Atsushi
        I don't know in what environment you are using Zabbix. If you are using an OS or DBMS that supports Zabbix 6.0 and you are using the official Zabbix package, you can upgrade by updating the Zabbix packages. And Zabbix server process will automatically perform the database upgrade process at startup.
        Make a backup before working so that you can recover from a failure.
        I just did this, and then it all works (after adding primary keys to items, which took almost two hours, single core job, it seems). But then - I now don't have new templates. It should be trivial to install them, though, how easy is it to move existing hosts and their history to new templates?

        Comment

        • Atsushi
          Senior Member
          • Aug 2013
          • 2028

          #5
          When migrating to a new template, if there is no item with the same item key, you will not be able to continue to get the value of that item. If you want to inherit the history of past items and continue to get the values of the same item, you may decide not to move to the new template.

          Comment

          • RoyK
            Junior Member
            • Jan 2016
            • 20

            #6
            Originally posted by Atsushi
            When migrating to a new template, if there is no item with the same item key, you will not be able to continue to get the value of that item. If you want to inherit the history of past items and continue to get the values of the same item, you may decide not to move to the new template.
            I read this as "You can move to new templates, but then you'll have to ditch those two years worth of data". This is not a very good alternative, at least thinking it will be a version 7 or 8 or 9 coming some day and I'll face the same problem over and over again. One of the really nice things with Zabbix is that history and trends are kept for a long time, so one an easily look back a year to check for growth.

            So I just wonder - what can be done to keep these data? Not only from 5.x to 6, but also for forthcoming versions. Keeping the old server for lookups only is a very bad substitution for this, at least for large setups.

            Comment


            • Atsushi
              Atsushi commented
              Editing a comment
              If you think historical data is important and you want to get the value continuously, you can continue to use the existing template.
          • RoyK
            Junior Member
            • Jan 2016
            • 20

            #7
            But then I need to sacrifice new items/options in newer templates and will this continue to be the case? I just wonder why the upgrade process can't upgrade existing templates instead of just adding new ones. We will all experience this problem, after all.

            Comment


            • Atsushi
              Atsushi commented
              Editing a comment
              I understand that Zabbix upgrades don't update monitoring templates on their own so that they can continue their past monitoring work. New monitoring templates cannot simply be upgraded as they use new features and adopt new policies and monitoring methods. If you want to combine new features with features you want to continue using, you will need to create such a template yourself.
          • cyber
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Dec 2006
            • 4807

            #8
            So what is your main issue, migrating data from 5 to 6 or applying new templates.
            I suppose while going from 5 to 6, you will ugrade platform also, so you need to do some export import, but your server does conversions on first startup.

            Applying new templates is different matter. You need to do your analyze at first, what can be updated and what not. And update does not mean losing data. Update is update, not delete and recreate...
            All this is something that Zabbix cannot do for you, as every environment differs, OOB templates, OOB templates with changes, completely custom templates... How should zabbix know, what to update/upgrade?

            Comment

            • RoyK
              Junior Member
              • Jan 2016
              • 20

              #9
              Originally posted by cyber
              So what is your main issue, migrating data from 5 to 6 or applying new templates.
              I suppose while going from 5 to 6, you will ugrade platform also, so you need to do some export import, but your server does conversions on first startup.

              Applying new templates is different matter. You need to do your analyze at first, what can be updated and what not. And update does not mean losing data. Update is update, not delete and recreate...
              All this is something that Zabbix cannot do for you, as every environment differs, OOB templates, OOB templates with changes, completely custom templates... How should zabbix know, what to update/upgrade?
              I beleive you're spot on here. Since we installed zabbix 4.something, we've upgraded as we were going and added new templates, but never found a way to upgrade the old templates to be like the new ones. This means that for some of the hosts, starting from scratch will be a good idea if they're based on templates created by now all dead gods or similar. But then - we have added a lot since then too that should be upgradable somehow. I just don't know how.

              I apologise if I'm asking the wrong questions here, but we just need some help on this.

              Comment

              • Markku
                Senior Member
                Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
                • Sep 2018
                • 1781

                #10
                When migrating to a new template, if there is no item with the same item key, you will not be able to continue to get the value of that item.
                That's the thing: if the new template has the same key as your current/old template, all your data is "carried over" to the new template.

                Markku

                Comment

                • LenR
                  Senior Member
                  • Sep 2009
                  • 1005

                  #11
                  Zabbix templates are really a starting point. I load new Zabbix on a clean test database so I can look at and export new templates. When the upgrade requires an OS update, I build a new zabbix server, copy the database over, then manually add any of the new template items we want to our templates.

                  Comment

                  Working...