This section describes steps required for a successful upgrade to Zabbix 6.4.x containers.
Separate sets of instructions are available for upgrading individual Zabbix component images and Docker compose files.
Before the upgrade make sure to read the relevant upgrade notes!
Before starting the upgrade, verify that users have the necessary permissions to the database for upgrading purposes.
For upgrades from Zabbix 6.0 or older, deterministic triggers will need to be created during the upgrade. If binary logging is enabled for MySQL/MariaDB, this requires superuser privileges or setting the variable/configuration parameter log_bin_trust_function_creators = 1. See Database creation scripts for instructions how to set the variable.
Note that if executing from a console, the variable will only be set temporarily and will be dropped when a Docker is restarted. In this case, keep your SQL service running, only stop zabbix-server service by running 'docker compose down zabbix-server' and then 'docker compose up -d zabbix-server'.
Alternatively, you can set this variable in the configuration file.
Depending on the size of a database upgrade to version 6.4 may take quite a long time.
The steps listed below can be used to upgrade any Zabbix component. Replace
zabbix-server-mysql with the required component image name.
1. Check current image version:
2. Pull desired image version, for example:
zabbix/zabbix-server-mysql:alpine-6.4-latest will pull the latest released minor version of Zabbix server 6.4 with MySQL support based on Alpine Linux. Replace it with the name of the Docker repository and tags combination you need. See Installation from containers for a list of available options.
3. Stop the container:
4. Remove the container:
5. Launch the updated container by executing
docker run command followed by additional arguments to specify required environment variables and/or mount points.
Zabbix server with MySQL:
docker run --name zabbix-server-mysql -t \ -e DB_SERVER_HOST="mysql-server" \ -e MYSQL_DATABASE="zabbix" \ -e MYSQL_USER="zabbix" \ -e MYSQL_PASSWORD="zabbix_pwd" \ -e MYSQL_ROOT_PASSWORD="root_pwd" \ -e ZBX_JAVAGATEWAY="zabbix-java-gateway" \ --network=zabbix-net \ -p 10051:10051 \ --restart unless-stopped \ -d zabbix/zabbix-server-mysql:alpine-6.4-latest
Zabbix server with PostgreSQL:
docker run --name zabbix-server-mysql -t \ -e DB_SERVER_HOST="postgres-server" \ -e POSTGRES_USER="zabbix" \ -e POSTGRES_PASSWORD="zabbix_pwd" \ -e POSTGRES_DB="zabbix" \ -e ZBX_ENABLE_SNMP_TRAPS="true" \ --network=zabbix-net \ -p 10051:10051 \ --volumes-from zabbix-snmptraps \ --restart unless-stopped \ -d zabbix/zabbix-server-pgsql:alpine-6.4-latest
More configuration examples, including examples for other Zabbix components, are available on the Installation from containers page.
6. Verify the update:
Follow upgrade instructions in this section, if you installed Zabbix using compose file.
1. Check current image version:
2. Pull the latest updates from the GitHub repository and switch to the required branch:
3. Start Zabbix components using new compose file:
4. Verify the update:
See Installation from containers for more details, including lists of supported environment variables and volume mount points.