Ad Widget

Collapse

Export configuration to a new installation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • amanogue
    Member
    • Mar 2015
    • 34

    #1

    Export configuration to a new installation

    Hi everyone.

    We're running a 2.4 Zabbix. Due to performnace and storage issues we need to migrate to a new VM (better V3.2)

    Is there anyhow to export-import all configuration (triggers, graphs, maps,hosts, templates, ...) We do not need history data, just configuration and personalization.

    Best regards.
    Antonio
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    Just copy database content to new db backend -> prune history*, trends* tables content -> do upgrade.
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment

    • Akansha123
      Member
      • Jun 2016
      • 54

      #3
      Data can be transferred to a different server by transferring the database :-

      [Perform below steps on the Server to be transferred]

      1.Stop the Zabbix server
      Ubuntu
      service zabbix-server stop
      CentOS
      systemctl stop zabbix-server
      2.Backup of database
      mysqldump -uroot -p<password> --database <Db_name> > <backup_name>.sql

      [Perform below steps on the Server where database to be transferred(Destination Server)]

      Pre-requisite: Zabbix set up is already complete
       1.Stop Zabbix Server
      Ubuntu:-
      service zabbix-server stop
      CentOS:-
      systemctl stop zabbix-server
       2.Delete Zabbix database
      DROP DATABASE <Db_name>
       3.Create Zabbix database
      CREATE DATABASE <Db_name>
       4.Restore the obtained backup
      mysql -u username -p database_name < backup_name.sql
       5.Start Zabbix Server
      Ubuntu:-
      service zabbix-server start
      CentOS:-
      systemctl start zabbix-server
      [Host to be monitored]

       1.Stop Zabbix agent
      Ubuntu:-
      service zabbix-agentd stop
      CentOS:-
      systemctl stop zabbix-agentd
       2. Change IP address of Zabbix Server in the configuration file of ZabbixAgent
        File:/etc/zabbix/zabbix_agentd.conf
        Changed location:Server=<NEW_SERVER_IP>
             ServerActive=<NEW_SERVER_IP>
       3.Start Zabbix Agent
      Ubuntu:-
      service zabbix-agentd start
      CentOS:-
      systemctl start zabbix-agentd

      Comment

      • amanogue
        Member
        • Mar 2015
        • 34

        #4
        Thank you for your guide.

        This procedure will work between 2.4 and 3.2 zabbix?

        Regards

        Comment

        • Akansha123
          Member
          • Jun 2016
          • 54

          #5
          Yes, it will work..

          Comment

          • alexE
            Junior Member
            • Aug 2017
            • 4

            #6
            will this also work for 2.0.2 to 3.2?

            Comment

            • M4rtin
              Junior Member
              • Jun 2022
              • 5

              #7
              Didn't work for me.
              Code:
              [*]Access denied for user 'zabbix'@'localhost' (using password: YES)
              ​
              Even after creating a new user and granting all access to zabbix@localhost, the message still appears.

              Comment

              Working...