Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Managed Service for ClickHouse
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Information about existing clusters
    • Creating clusters
    • Connecting to databases
    • Stop and start the cluster
    • SQL queries in the management console
    • Changing cluster and database settings
    • Connecting to DataLens
    • Connecting external dictionaries
    • Adding your own geobase
    • Enabling machine learning models
    • Changing ClickHouse versions
    • Managing ClickHouse hosts
    • Adding ZooKeeper hosts
    • Database management
    • Managing database users
    • Managing backups
    • How to manage shards
    • Deleting clusters
  • Solutions
    • Adding data to the database
    • Migrating ClickHouse data
    • Sharding tables
  • Concepts
    • Relationship between service resources
    • Host classes
    • Network in Yandex Managed Service for ClickHouse
    • Quotas and limits
    • Storage types
    • Backups
    • Replication
    • Dictionaries
    • Sharding
    • Supported clients
  • Access management
  • Pricing policy
    • Current pricing policy
    • Archive
      • Before January 1, 2019
      • From January 1 to March 1, 2019
      • From March 1, 2019 to February 1, 2020
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • BackupService
      • ClusterService
      • DatabaseService
      • FormatSchemaService
      • MlModelService
      • ResourcePresetService
      • UserService
      • VersionsService
      • OperationService
    • REST
      • Overview
      • Backup
        • Overview
        • get
        • list
      • Cluster
        • Overview
        • addHosts
        • addShard
        • addZookeeper
        • backup
        • create
        • createExternalDictionary
        • createShardGroup
        • delete
        • deleteExternalDictionary
        • deleteHosts
        • deleteShard
        • deleteShardGroup
        • get
        • getShard
        • getShardGroup
        • list
        • listBackups
        • listHosts
        • listLogs
        • listOperations
        • listShardGroups
        • listShards
        • move
        • rescheduleMaintenance
        • restore
        • start
        • stop
        • streamLogs
        • update
        • updateShard
        • updateShardGroup
      • Database
        • Overview
        • create
        • delete
        • get
        • list
      • FormatSchema
        • Overview
        • create
        • delete
        • get
        • list
        • update
      • MlModel
        • Overview
        • create
        • delete
        • get
        • list
        • update
      • ResourcePreset
        • Overview
        • get
        • list
      • User
        • Overview
        • create
        • delete
        • get
        • grantPermission
        • list
        • revokePermission
        • update
      • Versions
        • Overview
        • list
      • Operation
        • Overview
        • get
  • Questions and answers
    • General questions
    • Questions about ClickHouse
    • All questions on the same page
  1. Step-by-step instructions
  2. Changing ClickHouse versions

Changing versions ClickHouse

  • List of available versions
  • Before changing versions
  • Changing the version

You can change the ClickHouse version that the cluster uses.

List of available versions

Management console
CLI
API

You can view a list of available versions on the create and edit cluster screen in the management console:

ch-versions

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:

  1. See the ClickHouse changelog to check which updates might affect your apps.
  2. 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.
  3. Make a backup of the main cluster before changing the version.

Changing the version

To change the ClickHouse version:

Management console
CLI
API
  1. Open the Managed Service for ClickHouse page in the folder where you want to change the ClickHouse version.
  2. In the list of clusters, select the one to change.
  3. Click Edit cluster.
  4. In the Version field, select the version.
  5. 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.

  1. 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 |
    +----------------------+---------------+---------------------+--------+---------+
    
  2. 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"
        ...
    
  3. 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.

In this article:
  • List of available versions
  • Before changing versions
  • Changing the version
Language
Careers
Privacy policy
Terms of use
© 2021 Yandex.Cloud LLC