Changing versions ClickHouse
You can change the ClickHouse version that the cluster uses.
List of available versions
You can view a list of available versions on the create and edit cluster screen in the management console:
If you don't have the Yandex.Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To get a list of available versions, run the command:
yc managed-clickhouse version list
You can view a list of available versions using the list API method.
Before changing versions
Warning
If the cluster uses hybrid storage, the minimum version number you can change the cluster to is 20.1.
Before changing the ClickHouse version, make sure this doesn't affect your apps:
- See the ClickHouse changelog to check which updates might affect your apps.
- Try changing versions on a test cluster (you can try deploying it from a backup of the main cluster). Please note that when you deploy a cluster from a backup, only MergeTree engine tables are recovered.
- Make a backup of the main cluster before changing the version.
Changing the version
To change the ClickHouse version:
- Open the Managed Service for ClickHouse page in the folder where you want to change the ClickHouse version.
- In the list of clusters, select the one to change.
- Click Edit cluster.
- In the Version field, select the version.
- Click Save changes.
When the change starts, the cluster status switches to UPDATING
. Wait for the operation to complete and then check the cluster version.
If you don't have the Yandex.Cloud command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
-
Get a list of your ClickHouse clusters:
$ yc managed-clickhouse cluster list +----------------------+---------------+---------------------+--------+---------+ | ID | NAME | CREATED AT | HEALTH | STATUS | +----------------------+---------------+---------------------+--------+---------+ | c9q8p8j2gaih8iti42mh | clickhouse691 | 2019-04-23 12:44:17 | ALIVE | RUNNING | +----------------------+---------------+---------------------+--------+---------+
-
Get information about a cluster and check the ClickHouse version in your cluster in the
config.version
parameter:$ yc managed-clickhouse cluster get c9q8p8j2gaih8iti42mh id: c9q8p8j2gaih8iti42mh folder_id: b1gqs1teo2q2a4vnmi2t created_at: "2019-04-23T12:44:17.929853Z" name: clickhouse691 environment: PRODUCTION monitoring: - name: Console description: Console charts link: https://console.cloud.yandex.com/folders/b1gqs1teo2q2a4vnmi2t/managed-clickhouse/cluster/c9q8p8j2gaih8iti42mh?section=monitoring config: version: "19.1" ...
-
Execute the version change ClickHouse:
$ yc managed-clickhouse cluster update --id c9q8p8j2gaih8iti42mh --version 19.4
When the change starts, the cluster status switches to UPDATING
. Wait for the operation to complete and then check the cluster version.
You can change the ClickHouse version for a cluster using the update API method: pass the appropriate value in the configSpec.clickhouse.config.version
request parameter.