The backup and restoration feature of ApsaraDB for ClickHouse allows you to back up or restore data at any time.

Precautions

  • Before you use the backup and restoration feature, you must ticket to technical support engineers to apply for it first.
  • During the backup process, data files are read and replicated. This affects the read and write efficiency of the cluster. You can perform backup tasks during off-peak hours or maintenance windows.
  • A backup task cannot be resumed after it is interrupted.

Features

  • You can back up all databases, tables, views, data dictionaries, and metadata structures of the current cluster.
  • You can restore backup data to a cluster, instead of to a database or table. Only full restoration is supported.
  • The backup and restoration feature is only available on ClickHouse 20.3.10.75.

Enable data backup

The data backup feature is disabled after an ApsaraDB for ClickHouse cluster is created.

  1. Log on to the ApsaraDB for ClickHouse console by using your Alibaba Cloud account.
  2. In the upper-left corner of the page, select the region where the cluster is deployed.
  3. On the Clusters page, find the cluster and click its ID. The cluster details page appears.
  4. In the left-side navigation pane, click Backup and Restoration.
  5. Click the Backup Settings tab and turn on the Data Backup switch.
    Notice The first time you enable the data backup feature, a backup operation is immediately performed. This affects the write and query operations on the cluster.
  6. Only one backup schedule is allowed for a cluster. On the Backup Settings page, you can configure the following parameters:
    • The backup day. Backup tasks are periodically executed on a weekly basis. A backup task is executed several times a week. A maximum of one backup is performed each day. You can select any number of days in a week.
    • The default backup time is 2:00 to 3:00 of the specified day. If the backup task is not complete within the specified time range, the backup task continues in the background. You can customize the backup time. The specified time range is one hour long and can start at any exact hour within a day.
    • The retention period of a backup task starts when the task is created. The end time of the retention period is accurate to the minute. The retention period is seven days by default and you can customize it.
  7. Click OK. After the system performs a backup task, it is displayed on the Data Backup tab.

Restore data

After a backup task is executed, a backup set is generated. When cluster data is lost, you can use the backup set to restore data. To restore data, you must first create another cluster and then restore the backup data to the new cluster. You can choose to retain or delete the original cluster.

  1. Log on to the ApsaraDB for ClickHouse console by using your Alibaba Cloud account.
  2. In the upper-left corner of the page, select the region where the cluster is deployed.
  3. On the Clusters page, find the cluster and click its ID. The cluster details page appears.
  4. Click Backup and Restoration. On the page that appears, click the Data Backup tab.
  5. Find the backup set and click Restore.
  6. The Clone Cluster page appears. The new cluster has the same parameters as the original cluster by default. You can edit some parameters.
    Note The new cluster inherits the billing method of the original cluster.
    Editable parameters:
    • Restore Mode
    • Zone
    • VPC
    • vSwitch
    • Specifications
    • Storage Type
    • Encryption Type
    • Duration
  7. After the parameters are edited, click Buy Now. The status of the new cluster is displayed in the cluster list.
    • Creating indicates that a cluster is being created.
    • Restoring indicates that an automatic restoration task starts after the cluster is created.
    • Running indicates that the automatic restoration task is complete after the cluster is created.

Billing

  • Backup storage space is charged. ApsaraDB for ClickHouse provides a free quota for backup storage space: Free quota = 100% × Cluster storage capacity. For example, if the storage capacity of the current cluster is 100 GB, the free quota is 100 GB.
  • Billable storage space = Total backup storage space - Free quota. If the total backup storage space does not exceed the free quota, the cost is 0.
  • Fees = Billable storage space × Unit price for backup storage.