Upgrade via cloning

更新时间:
复制 MD 格式

You can upgrade the major engine version of an ApsaraDB for ClickHouse Community-compatible Edition cluster by cloning the instance from a real-time backup.

Prerequisites

Your ApsaraDB for ClickHouse Community-compatible Edition cluster must be version 20.3, 20.8, 21.8, or 22.8.

Precautions

Important

Write and query features, syntax, and performance may differ between major engine versions. Before upgrading a production environment, test thoroughly to ensure these differences do not affect your business.

  • This method does not apply to some early ApsaraDB for ClickHouse Community-compatible Edition clusters of version 20.3, 20.8, or 21.8. For these clusters, you must upgrade by migrating data. To check whether a cluster is an early cluster, see Check whether a cluster is an early cluster.

  • To upgrade between a Community-compatible Edition cluster and an Enterprise Edition cluster, you must migrate data.

  • Before performing an official upgrade in a production environment, complete testing and verification to determine the time required. Cloning is snapshot-based and completes in minutes regardless of data volume. However, the cluster restarts multiple times during the upgrade, and a single startup may take a long time for clusters with many databases, tables, or partitions (parts).

  • If Tiered Storage of Hot and Cold Data is enabled for a cluster, the cloned instance contains only hot data. Cold data cannot be queried on the new cluster.

  • Synchronization tables and external tables for services such as Kafka, MySQL, and RabbitMQ cannot be cloned and are deleted after the clone completes.

Upgrade process

Clone the cluster first to test compatibility. After verifying that your business works with the new version, perform a second clone to complete the upgrade.

The process is as follows:

  1. Test and verification (This step is optional for non-production environments).

    1. Clone the cluster from a real-time backup and upgrade the major engine version during the process.

    2. You can authenticate the service.

    3. Authentication succeeded.

    4. Writes to the instance are stopped.

    5. Prepare for the official upgrade.

  2. Official upgrade.

    Important

    To ensure the new cluster has all data from the source cluster, stop all write operations to the source cluster before performing the official clone.

    1. Create a plan for the official upgrade that includes a quick business verification method.

    2. Stop write operations to the source cluster.

    3. Clone the cluster from a real-time backup and upgrade the major engine version during the process.

    4. Perform a quick business verification.

    5. Authentication succeeded.

    6. Switch the read and write connection strings to the new cluster.

    7. Done.

(Optional) Business verification methods

  • Retrieve the query_log from the source cluster and run it on the new cluster to verify query compatibility with the new version.

  • Perform a full regression test on your business features.

Procedure

  1. Log on to the ApsaraDB for ClickHouse console with your Alibaba Cloud account.

  2. In the top navigation bar, select the region where the target cluster is located.

  3. In the navigation pane on the left, click Clusters.

  4. Find the target cluster and click the cluster ID to open the Cluster Information page.

  5. In the navigation pane on the left, click Backup and Restoration. On the Backup and Restoration page, click the Restore Instance button.

  6. On the clone instance purchase page, confirm the Target Instance Engine Version. Adjust the new instance configuration as needed and place the order.

  7. After you place the order, verify that the new cluster runs the target major engine version and its status is Running. This confirms that the upgrade is complete.

Check if an instance is an early instance

  1. Log on to the ApsaraDB for ClickHouse console with your Alibaba Cloud account.

  2. In the top navigation bar, select the region where the target cluster is located.

  3. In the navigation pane on the left, click Clusters.

  4. Find the target cluster and click the cluster ID to open the Cluster Information page.

  5. On the Cluster Information page, find the Configuration Information section and check the Minor Version. If the value is "-", the cluster is an early cluster.