All Products
Search
Document Center

ApsaraDB for ClickHouse:Data backup

Last Updated:Jun 12, 2023

ApsaraDB for ClickHouse provides the data backup feature. To use this feature, you must turn on Backup Service Switch.

Prerequisites

ApsaraDB for ClickHouse allows you to back up data if your ApsaraDB for ClickHouse cluster meets the following requirements:

  • The storage type of your cluster is enhanced SSD (ESSD) PL1, ESSD PL2, or ESSD PL3.

  • The kernel version of your cluster is 21.8 or later.

Precautions

  • You can configure only one backup schedule for each ApsaraDB for ClickHouse cluster.

  • You can back up all databases, tables, views, data dictionaries, and metadata structures of your cluster.

  • During the backup process, data files are read and replicated. This reduces the read and write efficiency of your cluster. We recommend that you perform backup tasks during off-peak hours or maintenance windows.

  • A backup task cannot be interrupted after it is started.

  • If you enable tiered storage of hot data and cold data for an ApsaraDB for ClickHouse cluster, you cannot enable the data backup feature for this cluster.

Billing

  • Billing formula: Fee for backup space = Used backup space × Unit price of backup space × Usage duration

  • For more information about the unit price of backup space, see Fees for backup space in ApsaraDB for ClickHouse clusters.

  • Example: If you buy an ApsaraDB for ClickHouse cluster that is deployed in China (Hangzhou) and use 100 GB of backup space for 1 hour, you are charged based on the following equation: 100 GB × USD 0.000024 per GB-hour × 1 hour = USD 0.0024.

    Important

    The fee provided in this example is for reference only. The actual fees in the console shall prevail.

Enable the data backup feature

  1. Log on to the ApsaraDB for ClickHouse console.

  2. In the top navigation bar, select the region where your cluster is deployed.

  3. On the Default Instances tab of the Clusters page, click the ID of the cluster on which you want to enable the data backup feature.

  4. In the left-side navigation pane, click Backup and Restoration.

  5. On the Backup and Restoration page, click the Backup Settings tab.

  6. On the Backup Settings tab, turn on Backup Service Switch.

  7. In the Backup Settings panel that appears, set the parameters described in the following table.

    Parameter

    Description

    Backup Cycle

    Backup tasks are performed on a weekly basis. A maximum of one backup task can be performed per day. You can select multiple days in a week.

    Backup Time

    The default backup time range is 02:00-03:00 on the day when you enable the data backup feature. You can set a time range based on your business requirements.

    Backup Retention Time

    By default, backup data is retained for seven days. You can set the number of days for which you want to retain your backup data to a value in the range of 7 to 730.

  8. Click OK to complete the backup configuration.

After a backup task is performed, one set of backup data is generated. You can use the backup data to restore your cluster data to a new ApsaraDB for ClickHouse cluster. For more information, see Data restoration.

Important

To prevent loss of backup data, restore your backup data to a new ApsaraDB for ClickHouse cluster in a timely manner.

Disable the data backup feature

Important

After the data backup feature is disabled, all historical backup snapshots are deleted. Before you disable the data backup feature, restore your backup data to a new ApsaraDB for ClickHouse cluster in a timely manner to prevent loss of the backup data. For more information about how to restore data, see Data restoration.

  1. Log on to the ApsaraDB for ClickHouse console.

  2. In the top navigation bar, select the region where your cluster is deployed.

  3. On the Default Instances tab of the Clusters page, click the ID of the cluster on which you want to disable the data backup feature.

  4. In the left-side navigation pane, click Backup and Restoration.

  5. On the Backup and Restoration page, click the Backup Settings tab.

  6. On the Backup Settings tab, turn off Backup Service Switch.

  7. In the Note message that appears, click OK.