All Products
Search
Document Center

Tablestore:Back up data in Tablestore

更新時間:Nov 21, 2024

To prevent business exceptions caused by accidental deletion or malicious tampering of important data, we recommend that you use the data backup feature of Tablestore to back up important data in your Tablestore instances. This topic describes how to back up full data or incremental data in Tablestore on a regular basis.

Usage notes

  • If you use the data backup feature for the first time, Cloud Backup automatically creates a service-linked role named AliyunServiceRoleForHbrOtsBackup to obtain Tablestore instances within your Alibaba Cloud account. Follow the instructions to authorize Cloud Backup to access your Tablestore resources. For more information, see Service-linked roles for Cloud Backup.

  • Cloud Backup automatically reads and loads the Tablestore instances in the region in which Cloud Backup is activated without requiring you to install a client.

  • You can back up data in Tablestore instances only to the backup vaults of Cloud Backup that reside in the same region as the Tablestore instances. Cross-region backup is not supported.

  • You can back up and restore only data tables and search indexes in Tablestore instances. You cannot back up secondary indexes or time series tables.

  • You cannot back up or restore the data of a disabled reserved instance. The data that is backed up is retained in the backup vaults of Cloud Backup in the selected region.

  • Cloud Backup cannot back up the encryption settings of encrypted tables in Tablestore. Therefore, after encrypted tables in Tablestore are backed up to a backup vault, the tables are not encrypted in the backup vault.

  • We recommend that you back up data in Tablestore during off-peak hours. If you want to back up data during peak hours, we recommend that you use the throttling feature to limit the maximum traffic that can be consumed by the data backup feature. Otherwise, your business may be affected.

  • Data is compressed during the backup process. The compression rate is related to the data characteristics.

Procedure

  1. Go to the Create Backup Plan panel.

    1. Log on to the Tablestore console.

    2. In the left-side navigation pane, click Data Backup.

    3. On the Data Backup page, select the region in which the resources that you want to back up reside.

      The system automatically obtains the instance list in the selected region.

    4. Find the instance that you want to back up and click Back Up in the Actions column.

  2. Select the tables that you want to back up.

    1. In the Backup Content step of the Create Backup Plan panel, enter the name of the backup plan and select the tables that you want to back up.

      You can back up multiple tables at a time.

    2. Click Next.

  3. Configure the backup plan.

    1. In the Backup Plan step, configure the parameters for full data backups.

      Parameter

      Description

      Full Backup

      By default, Full Backup is turned on. This indicates that the full data is to be backed up. You cannot turn off Full Backup.

      Backup Frequency

      The frequency of a full data backup. Valid values: Daily, Weekly, and Monthly.

      Run At

      The time at which a full data backup starts on a day. The time is accurate to the second.

      Time Interval

      The interval at which a full data backup is performed. Unit: day. This parameter is displayed only if the Backup Frequency parameter is set to Daily.

      Backup Week

      The day of the week on which a full data backup is performed. This parameter is displayed only if the Backup Frequency parameter is set to Weekly.

      Backup Month

      The month in which a full data backup is performed. You can select multiple months. This parameter is displayed only if the Backup Frequency parameter is set to Monthly.

      Backup Day

      The day of the month on which a full data backup is performed. You can select multiple days. This parameter is displayed only if the Backup Frequency parameter is set to Monthly.

      Important

      If the day that you select does not exist in the specified month, Cloud Backup automatically skips the backup on the day.

    2. Configure the parameters for incremental data backups based on your business requirements.

      By default, Incremental Backup is turned on. This indicates that the incremental data is to be backed up. An incremental data backup only backs up the incremental data after the last full data backup. The data volume is smaller and the backup is faster.

      • If you want to back up only the full table data at a time on a regular basis, turn off Incremental Backup.

      • If you want to continuously back up the incremental table data, turn on Incremental Backup and configure the parameters for incremental data backups.

        Parameter

        Description

        Backup Frequency

        The frequency of an incremental data backup. Valid values: Minutely, Hourly, and Daily.

        Run At

        The time at which an incremental data backup starts on a day. The time is accurate to the second. This parameter is displayed only if the Backup Frequency parameter is set to Daily.

        Time Interval

        The interval at which an incremental data backup is performed. The value of this parameter varies based on the backup frequency:

        • If you set the Backup Frequency parameter to Minutely, the value of the Time Interval parameter is fixed as 30 minutes and cannot be changed.

        • If you set the Backup Frequency parameter to Hourly, the value of the Time Interval parameter ranges from 1 to 24 hours. Configure this parameter based on your business requirements.

        • If you set the Backup Frequency parameter to Daily, the value of the Time Interval parameter ranges from one to five days. Configure this parameter based on your business requirements.

    3. Click Next.

  4. Configure the backup settings.

    1. Create a backup vault or select an existing backup vault based on your business requirements.

      Create a backup vault

      If no backup vault is created or the existing backup vaults do not meet your business requirements, create a backup vault.

      1. Set the Backup Vault parameter to Create Vault.

        To maximize the redundancy of your backup data, Cloud Backup uses zone-redundant storage (ZRS)-enabled backup vaults by default in regions that support ZRS-enabled backup vaults. For regions that support only locally redundant storage (LRS)-enabled backup vaults, Cloud Backup uses LRS-enabled backup vaults. You do not need to manually select a backup vault type.

      2. By default, the system generates a name for the new backup vault. Modify the name based on your business requirements.

      3. By default, a new backup vault belongs to the default resource group. Select another existing resource group or create a resource group based on your business requirements.

        Note

        Alibaba Cloud allows you to sort resources owned by your Alibaba Cloud account into resource groups. This simplifies resource and permission management within your Alibaba Cloud account. For more information, see Create a resource group.

      4. Specify an encryption method to encrypt the data in the backup vault.

        Cloud Backup provides the following encryption methods: Cloud Backup-managed and KMS.

        Important
        • You cannot change the encryption method after the backup vault is created. Perform this operation with caution.

        • If you specify a customer master key (CMK) to encrypt your backup data, you cannot change the CMK after the backup vault is created.

        • If you specify a CMK to encrypt your backup data, you cannot delete or disable the CMK after the backup vault is created. If you delete or disable the CMK, you cannot use the backup vault to back up or restore data.

        • Before you use a CMK to encrypt data in a backup vault, you must create a CMK in the Key Management Service (KMS) console and obtain the CMK ID. For more information, see Create a CMK.

        Encryption method

        Operation

        Description

        Cloud Backup-managed encryption

        Set the Backup Vault Encryption Method parameter to Cloud Backup-managed.

        By default, Cloud Backup uses the built-in encryption method to encrypt the data in the backup vault and automatically decrypts the data when you restore the data.

        If you use this encryption method for the first time, Cloud Backup automatically creates a CMK in the KMS console. You need to only activate KMS without the need to purchase a KMS instance.

        KMS-based encryption

        1. Set the Backup Vault Encryption Method parameter to KMS.

        2. Configure the KMS KeyId parameter.

        Use a CMK of the specified ID to encrypt the data in the backup vault. Cloud Backup encrypts data by using the CMK that you specify. You can manage the CMK that you use.

        If you want to use the KMS-based encryption method, you must create a service-linked role named AliyunServiceRoleForHbrVaultEncryption to authorize Cloud Backup to access your KMS resources.

      Select an existing backup vault

      If an existing backup vault meets your business requirements, select the existing backup vault.

      1. Set the Backup Vault parameter to Select Vault.

      2. Select a backup vault from the Vault Name drop-down list.

    2. Modify the retention period of backup data based on your business requirements. The default retention period is two years.

      The backup data must be retained for at least one day.

    3. If you want to back up data during peak hours, turn on Enable Traffic Shaping and configure the throttling parameters.

      By default, Enable Traffic Shaping is turned off. This indicates that the maximum traffic of data backup is not limited. If you back up data during peak hours without enabling the throttling feature, your business may be affected.

      1. Drag the sliders to the right of the Time Range (Hour) parameter to configure the start time and end time when traffic is limited.

      2. In the Max Bandwidth(MB) field, enter the maximum traffic that can be consumed for data backup during the specified throttling period. Then, click Add.

        If you want to configure throttling rules for multiple throttling periods, repeat the preceding steps. You can view the throttling rules configured for different throttling periods in the Bandwidth Throttling Rules section.

  5. Click OK.

    By default, the created backup plan is enabled. Cloud Backup backs up the data in the specified Tablestore instance based on the specified backup start time and interval. You can view the created backup plan on the Backup Plans tab.

    image.png

  6. If the specified backup start time does not arrive, you can manually perform a backup.

    • To immediately perform a full data backup, choose More > Perform Full Backup Now in the Actions column of the backup plan.

    • To immediately perform an incremental data backup, choose More > Perform Incremental Backup Now in the Actions column of the backup plan.

    Cloud Backup generates a backup job for each backup operation. You can view the status of a backup job on the Backup Jobs tab. If the Status column of a backup job changes to Completed, the backup job is complete. After an incremental backup job is complete, the progress of the backup job is displayed as 100% in the Status column.

    image.png

What to do next

After a backup plan is created, perform the following operations to manage the backup plan based on your business requirements.

Operation

Description

Disable or enable the backup plan

By default, the created backup plan is enabled. If you no longer want to run the backup plan, disable the backup plan.

  1. Find the backup plan that you want to disable and click the image.png icon in the Plan Status column.

  2. In the message that appears, click OK.

If you want to enable the backup plan again after the backup plan is disabled, click the image.png icon in the Plan Status column.

Modify the backup plan

After the backup plan is created, you can modify the configurations of the backup plan. For example, you can reconfigure the tables to be backed up, the scheduled time settings, the backup retention period, and whether to use the throttling feature.

  1. Find the backup plan that you want to modify and click Edit in the Actions column.

  2. In the Modify Plan panel, modify the configurations of the backup plan based on your business requirements.

  3. Click OK.

Run a backup job

After you run a backup job, you can view the information about the backup job on the Backup Jobs tab of the instance. The information includes the names of the tables that are backed up and the size of data and number of rows that are read, backed up, and written to the backup vault.

To cancel a backup job that is in progress, click Cancel in the Actions column and click OK.

Specify an alert notification method for the backup plan

You can specify an alert notification method for the backup plan and monitor the status of the backup plan. This helps you detect and handle exceptions at your earliest opportunity. For more information, see Specify an alert notification method for a backup plan.

Delete the backup plan

You can delete the backup plan if you no longer need it.

Important

After the backup plan is deleted, you cannot restore the backup plan.

  1. Find the backup plan that you want to delete and choose More > Delete in the Actions column.

  2. In the message that appears, click OK.