Ad Widget

Collapse

First time update from 7.4.5 > 7.4.6 advise/help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • G0nz0uk
    Member
    • Apr 2021
    • 46

    #1

    First time update from 7.4.5 > 7.4.6 advise/help

    Hello,

    I've been given the task to update out Zabbix server and frontend. I've not built any of this (chap left), but looking his documentation which is good, it misses off the how to update it all.

    I'm just reading this: https://www.zabbix.com/documentation...lation/upgrade

    All are running Ubuntu.

    We have:

    1 x Zabbix + Frontend (nginx) - 7.4.5

    1 x Postgres v18 + TSDB

    2 x SQLite proxy servers

    Looking at the install documentation to install it this was used:

    repo:
    Code:
    wget https://repo.zabbix.com/zabbix/7.4/release/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest_7.4+ubuntu24.04_all.deb
    
    dpkg -i zabbix-release_latest_7.4+ubuntu24.04_all.deb
    
    apt update
    Then:
    Code:
    apt install zabbix-server-pgsql zabbix-frontend-php php8.3-pgsql zabbix-nginx-conf zabbix-sql-scripts zabbix-agent2
    
    Install Zabbix agent 2 plugins
    
    apt install zabbix-agent2-plugin-mongodb zabbix-agent2-plugin-mssql zabbix-agent2-plugin-postgresql
    Looking at the upgrade info I should be ok with this below. I'll snapshot the server. What do I do with the postgresDB/TSDB and Proxy servers?
    Code:
    apt update
    apt install --only-upgrade 'zabbix*'
    Is this what you normally use?
  • Donkey
    Junior Member
    • Jun 2024
    • 15

    #2
    Yeah, more or less. It's not too scary. Assuming they are VMs, as you say, snapshot each server. Then this is how I do it:
    • Consult the Release Notes. Here you will find links to the upgrade procedure and the upgrade notes for the specific minor version
    • Upgrading Zabbix agents is recommended but not mandatory.
    • To minimize downtime and data loss during the upgrade, it is recommended to stop, upgrade, and start Zabbix server and then stop, upgrade, and start Zabbix proxies one after another. During server downtime, running proxies will continue data collection. Once the server is up and running, outdated proxies will send the data to the newer server (proxy configuration will not be updated though) and will remain partly functional. Any notifications for problems during Zabbix server downtime will be generated only after the upgraded server is started.
    1. Stop the Zabbix server: sudo systemctl stop zabbix-agent2 zabbix-server
    2. There is no need to stop the database. On the database server: sudo apt update && sudo apt upgrade && sudo apt autoremove
    3. On the Zabbix server, update Zabbix: sudo apt update && sudo apt upgrade && sudo apt autoremove
    4. On the Zabbix server, restart the services: sudo systemctl restart zabbix-server.service zabbix-agent2.service nginx.service
    5. Stop a proxy server: sudo systemctl stop zabbix-agent2 zabbix-proxy.service
    6. Update it: sudo apt update && sudo apt upgrade && sudo apt autoremove
    7. Restart the services: sudo systemctl restart zabbix-proxy.service zabbix-agent2.service
    8. Repeat steps 5,6 and 7 on any other proxies
    If apt prompts you, just choose the default option.

    Go into Administration | Proxies and watch them come online and the version number increase.

    Last edited by Donkey; 23-12-2025, 14:21.

    Comment

    • G0nz0uk
      Member
      • Apr 2021
      • 46

      #3
      What a nice reply, really goo, thank you! I'll give this a try.

      I'll pick your brains when it's time to do the v8 upgrade when it's official and bug free. I'm joking, but I think that will be a tough upgrade.

      Comment

      • Donkey
        Junior Member
        • Jun 2024
        • 15

        #4
        Here's my little backup bash script, it obviously doesn't back up the entire thing, but if you've modified any PHP files then this is a little get-out-of-jail-free-card.

        #!/bin/bash

        sudo mkdir /opt/zbx-backup/
        sudo mkdir /opt/zbx-backup/database/
        sudo mkdir /opt/zbx-backup/zbx-config/
        sudo mkdir /opt/zbx-backup/nginx/
        sudo mkdir /opt/zbx-backup/lib/
        sudo mkdir /opt/zbx-backup/shared/
        sudo mkdir /opt/zbx-backup/shared/zabbix/
        sudo mkdir /opt/zbx-backup/shared/doc/

        sudo cp -r /etc/zabbix/ /opt/zbx-backup/zbx-config/
        sudo cp /etc/hosts /opt/zbx-backup/


        sudo cp -f /usr/share/zabbix/ui/include/views/general.login.php /opt/zbx-backup/general.login.php # Server login page
        sudo cp -f /usr/share/zabbix/ui/include/classes/helpers/CMenuHelper.php /opt/zbx-backup/CMenuHelper.php
        sudo cp -f /usr/share/zabbix/ui/assets/styles/logon.css /opt/zbx-backup/logon.css # Server login page style
        sudo cp -f /usr/share/zabbix/ui/include/classes/helpers/CBrandHelper.php /opt/zbx-backup/CBrandHelper.php # Footer defined in here

        sudo cp -r /usr/lib/zabbix/ /opt/zbx-backup/lib/
        sudo cp -r /etc/nginx/ /opt/zbx-backup/nginx/

        Comment

        Working...