Upgrading and downgrading on ClickHouse is a quite simple operation. In this article, we will explain how to do these operations with examples.
For the upgrade process, you can start the upgrade process by typing the version you want specifically.
ClickHouse does not support a distributed update. The operation should be performed consecutively on each separate server. Do not update all the servers on a cluster simultaneously, or the cluster will be unavailable for some time.
To reach official ClickHouse releases, please visit here.
|♣ NOTE: You can update multiple servers at once as soon as there is no moment when all replicas of one shard are offline.|
To upgrade, you have to run the commands which is given below;
sudo apt-get update sudo apt-get install clickhouse-server=xx.yy.a.b clickhouse-client=xx.yy.a.b clickhouse-common-static=xx.yy.a.b sudo service clickhouse-server restart
Lets give an example;
1- First upgrade your OS.
2- Install specific version of ClickHouse.
3- Restart ClickHouse server.
4- Check ClickHouse version.
Check current version;
clickhouse-client --version ClickHouse client version 22.214.171.124 (official build).
Now, run the commands given below;
sudo apt-get update sudo apt-get install clickhouse-server=126.96.36.1995 clickhouse-client=188.8.131.525 clickhouse-common-static=184.108.40.2065 sudo service clickhouse-server restart
Verify new version of ClickHouse
clickhouse-client --version ClickHouse client version 220.127.116.115 (official build).
When you examine the logs under the /var/log/clickhouse-server/clickhouse-server.log directory, you will see that the new version of clickhouse is running after the restart.
<Trace> Pipe: Pipe capacity is 1.00 MiB <Information> : Starting ClickHouse 18.104.22.1685 with revision 54463, build id: A1A632F69545B4EC, PID 88660 <Information> Application: starting up <Information> Application: OS name: Linux, version: 5.13.0-1031-gcp, architecture: x86_64
You can follow same steps for downgrade operation.