Ad Widget

Collapse

Zabbix database migration

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • davec5
    Junior Member
    • Dec 2017
    • 9

    #1

    Zabbix database migration

    I am currently running Zabbix 2.2 on a rhel6 server. I am installing Zabbix 3.4 on a rhel7 server using the yum packages. I've not found anything about migrating the 2.2 mysql database to Zabbix 3.4. Is it as easy as shutting down Zabbix server, doing mysqldump on old, importing that on the 3.4 server, and restarting Zabbix? I would like to keep the history if possible
  • registration_is_lame
    Senior Member
    • Nov 2007
    • 148

    #2
    Do a mysql dump from the old and restore it on the new rhel7. Then you have to run zabbix sql scripts- zcat /usr/share/doc/zabbix-server-mysql-3.2.*/create.sql.gz | mysql -uzabbix -p zabbix

    (Just install zabbix-server-mysql package on rhel7 and then you'll find create.sql.gz under /usr/share/doc/zabbix-server-mysql-3.2.*/. Otherwise you can also download zabbix 3.2 source and you'll have the a few sql.gz files and run them all.)

    You will not lose history. This just makes sure new tables and column names are setup.

    Then install zabbix server binaries and then start the server and check the zabbix_server.log. Also install zabbix-frontend, but backup 2.2 frontend files first (its in /usr/share/zabbix/)

    Refer the following documents.




    Last edited by registration_is_lame; 04-12-2017, 13:55.

    Comment

    • davec5
      Junior Member
      • Dec 2017
      • 9

      #3
      I restore the database from the old release. However when I run the create.sql.gz it immediately gives an error

      ERROR 1050 (42S01) at line 1: Table 'users' already exists


      I don't think reversing the steps will help since the sql file produced by mysqldump drops the table if it exists.

      I'm not that familiar with mysql so any help would be appreciate.

      Comment

      • Atsushi
        Senior Member
        • Aug 2013
        • 2028

        #4
        After restoring the 2.2 database, please start the Zabbix server and connect to that database.
        It is not necessary to load create.sql.gz.

        Comment

        • davec5
          Junior Member
          • Dec 2017
          • 9

          #5
          That worked great. I can see messages in the log show progress and it says it completed. I also see messages about items not being supported. Is this something to be concerned about? They all seem to be for vmware information on linux servers. These server are running under vmware. Is this something to be concerned about?


          6486:20171208:141425.177 item "dcs.services.edu:vmware.vm.memory.size.swappe d[{$URL},{HOST.HOST}]" became not supported: No "vmware collector" processes started.

          Comment

          • Atsushi
            Senior Member
            • Aug 2013
            • 2028

            #6
            If you want to monitor VMware, you need to make settings in the Zabbix server configuration file(zabbix_server.conf).

            Please set the value of StartVMwareCollectors to 1 or more, then restart the Zabbix server service.

            Comment

            • davec5
              Junior Member
              • Dec 2017
              • 9

              #7
              Thank you.

              Comment

              Working...