Top.Mail.Ru
Updating the ClickHouse DBMS
CTRL+K

Updating the ClickHouse DBMS

In this article
  • Updating the ClickHouse DBMS
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:

  1. Remove the ClickHouse service from Docker:
    # docker service rm operavix-clickhouse
    
  2. 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.
    # 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"
    
    Note: The image version is provided as an example. When running the command, replace the specified version with the one you are installing.
  3. 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.
    # 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
    
    Note: The image version is provided as an example. When running the command, replace the specified version with the one you are installing.
  4. 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
    
  5. Verify that the ClickHouse service is running—open https://<server_address>:8123/ping in 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
      

Was the article helpful?

Yes
No
Previous
Installing and Removing the ClickHouse DBMS
We use cookies to improve our website for you.