Ad Widget

Collapse

Import old config into new instance

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • airween
    Junior Member
    • Oct 2023
    • 11

    #1

    Import old config into new instance

    Hi there,

    I'm new on this forum and beginner in Zabbix.

    We have an old Zabbix system with version 5.0. We would like to move the Zabbix onto a new machine. The system is a Debian 12 there.

    Unfortunately Zabbix 5 is not compatible with Debian 12, I can't install it. But the export from the 5.0 is not compatible with the newer versions of Zabbix (I mean the XML exports).

    What can I do in this situation?


    Thanks,

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

    #2
    Like everyone else... Short version: install new version side by side, recreate your old DB in new platform (do not create new db schema), import data from old db to new platform and after first start your new server will do necessary upgrade tasks and you have a shiny new Zabbix with all of your old data and setup...
    You can find longer versions of this in forum, I think I have done it at least couple of times...

    Comment

    • Hamardaban
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • May 2019
      • 2713

      #3
      Zabbix is primarily data in a database and not xml. The right way is to update zabbix on the old computer to supported versions, install exactly the same version on the new server and move the database and everything else there.

      While I was writing, have already answered! :-)

      Comment

      • airween
        Junior Member
        • Oct 2023
        • 11

        #4
        Originally posted by cyber
        Like everyone else...
        Originally posted by Hamardaban
        ... The right way is to update zabbix on the old computer to supported versions, install exactly the same version on the new server and move the database and everything else there.

        Thanks guys all of you, then I'm going to try that.

        Next challenge: I have a Zabbix with version 5.0, and another one with 6.0. Customer wants me to merge the databases. Is there any recommended way to do that?

        I thought about XML export and import, because then I (hoped) I can merge all of data.

        Would that work if I install a Zabbix 6, load the old DB and let Zabbix server upgrade it, then I try to import the another 6.0's export?


        Thanks again,


        a.

        Comment

        • cyber
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Dec 2006
          • 4807

          #5
          Merge? That will be problematic as there is probably a lot of identical ID-s in both, hostID-s, itemID-s etc...

          You could probably recreate hosts/items/triggers/etc over API. In that case new ID-s will be assigned. But what to do with rest of data... no idea, I think you will lose it.. I just cannot imagine a conversion "program" that would export data form one instance. look up needed new ID-s from another and then insert ...
          Data ... maybe with zabbix_sender and time/ns values.. (with 7.0 history.push method over API also) but all events ... that will be lost ...

          Comment

          • airween
            Junior Member
            • Oct 2023
            • 11

            #6
            Originally posted by cyber
            Merge? That will be problematic as there is probably a lot of identical ID-s in both, hostID-s, itemID-s etc...

            You could probably recreate hosts/items/triggers/etc over API.
            Thanks, I was thinking about API (already have started to play with it), but now I'm confused.

            Luckily, there is not so much host and services in the other Zabbix instance, may be I can add them one by one. Even if the historical data is lost, it would not be a problem.​

            Thanks again.

            Comment

            Working...