Ad Widget

Collapse

Zabbix db migration MySQL->PostgreSQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • art
    Junior Member
    • Oct 2006
    • 12

    #1

    Zabbix db migration MySQL->PostgreSQL

    Hi All,

    We use zabbix 1.1.6 for almost a year now. Currently both web interface and MySQL database are on the same box. As network is growing and zabbix becoming main production monitoring tool we decided to migrate zabbix database to a separate dedicated server.

    We've got nice spare Sun SunFire box (SPARC) with Solaris10 on it as a candidate for a db server. As it is Solaris 10 the obvious database choice is PostgreSQL (comes standard with Solaris). Therefore the task is to migrate 9Gb of zabbix data in MySQL database on Linux box to the PostgreSQL on Solaris box (and possibly upgrade everything from 1.1.6 to 1.4.x).

    Could not find anything in docs regarding MySQL to PostgreSQL migration. I'm aware of third party mysql->postgres migration scripts but like to hear if there any ways to do migration supported/tested by Zabbix developers?

    Thank you,
    Art.
  • art
    Junior Member
    • Oct 2006
    • 12

    #2
    impossible?

    Comment

    • Niels
      Senior Member
      • May 2007
      • 239

      #3
      Judging from the initial files in create/, it appears possible to move the DB and change some table and field definitions. Developers, what say you?

      Comment

      • Alexei
        Founder, CEO
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Sep 2004
        • 5654

        #4
        It is absolutely possible! The schemas are identical, however some additional work is required to create MySQL -> PostgreSQL migration scripts.
        Alexei Vladishev
        Creator of Zabbix, Product manager
        New York | Tokyo | Riga
        My Twitter

        Comment

        • NOB
          Senior Member
          Zabbix Certified Specialist
          • Mar 2007
          • 469

          #5
          Originally posted by Alexei
          It is absolutely possible! The schemas are identical, however some additional work is required to create MySQL -> PostgreSQL migration scripts.
          So, it might be a lot easier to stay on MySQL, then.

          If you don't mind loosing the "old" data (like service_states, CPU load values, and so on) the following might be worth thinking of:

          Create a MySQL DB on the Solaris box , do the migration to 1.4.2 with MySQL,
          "export" the templates, hosts, items, etc. from 1.4.2 and then "import" it into
          the PostgreSQL DB on the same box.
          Remove the MySQL DB later.

          Done.

          Disadvantage: You will loose all old data gathered up to the start of the
          PostgreSQL version.

          Just an idea

          Regards

          Norbert.

          Comment

          • Alexei
            Founder, CEO
            Zabbix Certified Trainer
            Zabbix Certified SpecialistZabbix Certified Professional
            • Sep 2004
            • 5654

            #6
            If you'd like to hear my advice, I recommend MySQL. Being a big fan of PostgreSQL, I have to say that it does not work efficiently in situations when hundreds of update operations per second are executed for a single table like ZABBIX does.

            The advice is for 1.1.x and 1.4.x only. I don't know if it still will be valid for ZABBIX 1.6.
            Alexei Vladishev
            Creator of Zabbix, Product manager
            New York | Tokyo | Riga
            My Twitter

            Comment

            • NOB
              Senior Member
              Zabbix Certified Specialist
              • Mar 2007
              • 469

              #7
              Originally posted by Alexei
              If you'd like to hear my advice, I recommend MySQL. Being a big fan of PostgreSQL, I have to say that it does not work efficiently in situations when hundreds of update operations per second are executed for a single table like ZABBIX does.

              The advice is for 1.1.x and 1.4.x only. I don't know if it still will be valid for ZABBIX 1.6.
              While we are at it:

              How about using SQLite for monitoring, say, 10 to 30 servers (as a slave
              node).
              Would that be a bad idea ?
              I'm thinking about a low maintenance server, even without Apache/PHP frontend.
              That's why I did ask - in a different thread - for a way to configure the master/slave relationship between two nodes without having to install Apache/PHP frontend on every slave server.

              Regards,

              Norbert.

              Comment

              • SMB
                Member
                • Sep 2007
                • 30

                #8
                Sun does have MySQL packages available.

                Comment

                Working...