Updating the ClickHouse DBMS
In this article
Note
ClickHouse DBMS update is performed separately from the Operavix server application update. ClickHouse runs only on Linux and is updated using a Docker image.
To update the ClickHouse DBMS:
- Remove the ClickHouse service from Docker:
# docker service rm operavix-clickhouse - Initiate a backup of the database data. During command execution, the console will display the directories being copied. Ensure no copy error messages appear after the procedure completes.
Note: The image version is provided as an example. When running the command, replace the specified version with the one you are installing.
# docker run -it --rm \ --mount source=operavix-clickhouse,target=/clickhouse \ -v /tmp:/target \ operavix/operavix-clickhouse:22.8.3.13 \ /bin/bash -c "tar -cvf /target/clickhouse-$(date -u +%d.%m.%Y).tar /clickhouse" - Run the setpermission.sh script from the new ClickHouse image. The script adjusts file permissions so that the upgrade proceeds correctly on the next service start.
Note: The image version is provided as an example. When running the command, replace the specified version with the one you are installing.
# docker run -it --user root --rm \ --mount source=operavix-clickhouse,target=/var/lib/clickhouse/ \ --mount source=operavix-clickhouse-log,target=/var/log/clickhouse-server \ operavix/operavix-clickhouse:23.3.2.37 /setpermission.sh - Start the ClickHouse service.
# docker service create --name operavix-clickhouse \ --secret operavix_app_user \ --secret operavix_app_user_password_hash \ --secret operavix_external_user \ --secret operavix_external_user_password_hash \ --secret operavix_clickhouse_dhparam.pem \ --secret operavix_clickhouse.crt \ --secret operavix_clickhouse.key \ --publish published=8123,target=8123,mode=host \ --mount type=volume,src=operavix-clickhouse,target=/var/lib/clickhouse/ \ --mount type=volume,src=operavix-clickhouse-log,target=/var/log/clickhouse-server \ --restart-max-attempts 5 \ --restart-condition "on-failure" \ --no-resolve-image \ operavix/operavix-clickhouse:23.3.2.37 - Verify that the ClickHouse service is running—open
https://<server_address>:8123/pingin a browser or use the command:
curl https://<server_address>:8123/ping.- If the service is running, the response will be:
OK - If no response appears, check the ClickHouse service logs by running:
# docker service logs -f operavix-clickhouse
- If the service is running, the response will be:
Was the article helpful?
Yes
No