Ad Widget

Collapse

How to Export Zabbix 5.2 configurations to 5.4?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wpagane
    Member
    • Apr 2021
    • 31

    #1

    How to Export Zabbix 5.2 configurations to 5.4?

    Hello all,

    I'm running for days to find a good instruction of How to Export Zabbix 5.2 configurations (Hosts, specific Items that I've created, Actions, Configurations in the E-mail, Telegram, AD etc) to a new server that I installed Zabbix 5.4.

    I don't want the History, Logs.... nothing of that..... I just would like the "Hosts, some specific templates and Items I've created, Triggers" and that's it.

    Is it possible?
    if so, How? The Official Zabbix documentation isn't clear.


    Thank you very much.
    Last edited by wpagane; 09-07-2021, 15:55.
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #2
    Hi, I have made a memo of backing up just the configurations, and this is what it looks like:

    mysqldump -u zabbix --host x.x.x.x -p --single-transaction zabbix --ignore-table=zabbix.history --ignore-table=zabbix.history_uint --ignore-table=zabbix.history_text --ignore-table=zabbix.history_str --ignore-table=zabbix.history_log --ignore-table=zabbix.trends --ignore-table=zabbix.trends_uint --ignore-table=zabbix.events --ignore-table=zabbix.alerts --ignore-table=zabbix.auditlog --ignore-table=zabbix.auditlog_details --ignore-table=zabbix.acknowledges | bzip2 > zabbix-config-backup.bz2

    I have never tested it though, so use this at your own responsibility. Basically it dumps the full "zabbix" database but ignores those mentioned tables.

    Markku

    Comment

    • wpagane
      Member
      • Apr 2021
      • 31

      #3
      Markku, Thanks for the command. The line command it works perfectly. I was able to mysqldump and copy the backup to the new server (Zabbix 5.4) and import it.

      But, when I try to access the Front-End, It prompts: "The Zabbix database version does not match current requirements. Your database version: 5020000. Required version: 5040000. Please contact your system administrator."

      I'm using mysql Ver 8.0.21 for Linux on both servers. I'll search around what to do.

      Comment

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

        #4
        Great, Zabbix server will do the database upgrade when starting, so be sure to check your Zabbix server logs and only after that you can try the frontend.

        Markku

        Comment

        • wpagane
          Member
          • Apr 2021
          • 31

          #5
          Markku,

          When I started the Zabbix Server, I ran "cat /var/log/zabbix/zabbix_server.log | grep database" to check the DataBase update, but I noticed it failed (even rebooting the server):

          Click image for larger version

Name:	failed.png
Views:	259
Size:	93.0 KB
ID:	427949

          Comment

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

            #6
            Right, I have an idea: Presumably the ignored tables are now missing from the database, so the upgrade cannot proceed. So if you can get the missing tables (in 5.2 format) created somehow, you should be good to go.

            Or, take a full dump of the previous database and then remove the data statements from the tables that you want to purge in the dump, before importing it.

            Or, install first 5.2 with the default database creation script in 5.2, then import the config-only dump, and finally upgrade Zabbix to 5.4.

            Markku

            Comment

            Working...