Restore a Tablestore table

Updated at:

If a system fault or an incorrect operation affects a Tablestore instance, you can restore table data from a backup vault to the source instance or a specified instance. Each restore job restores one table at a time.

Prerequisites

You have created a Tablestore backup plan and completed a backup.

Billing details

  • Restoring Tablestore data to Tablestore incurs data write throughput fees, which are charged by Tablestore. For more information, see Billing overview.

  • For the first 30 days after you start using Tablestore backup, Cloud Backup does not charge any fees for an account. After 30 days, Tablestore backup is billed as follows:

    • During backup: Cloud Backup charges backup storage fees. Tablestore does not charge read traffic fees.

    • During restoration: Cloud Backup does not charge restoration fees. Tablestore charges fees for the data restoration.

Usage notes

Important

If you use a KMS key to encrypt data during backup and the KMS key is later disabled or deleted, the backup data in the backup vault cannot be restored.

Cloud Backup does not support restoring data directly to a table that contains a secondary index. To restore data to such a table, delete the secondary index of the destination table before you run the restore job, and recreate the secondary index after the data restoration is complete. Recreating a secondary index does not incur fees.

Procedure

Note

After you create a backup plan, the first backup job is a full backup. Subsequent backup jobs are incremental by default.

  1. Go to the Create Restore Job panel.

    1. Log on to the Cloud Backup console.

    2. In the left-side navigation pane, choose Back Up > Tablestore Backup.

    3. In the top navigation bar, select a region.

    4. In the Actions column of the instance, click Restore or choose ┇ > Restore to This Instance.

      If you choose Restore, the source instance is this instance and cannot be changed. If you choose Restore to This Instance, the destination instance is automatically set to this instance and can be changed as needed.

  2. In the Create Restore Job panel, configure the data to restore.

    1. Configure the parameters for data restoration.

      Parameter

      Description

      Source Database

      This parameter is displayed only if you choose Restore.

      The name of the source database. The name cannot be changed. Data can be restored only from this instance to a specified instance.

      Backup vault

      This parameter is displayed only if you choose Restore to This Instance.

      Select the backed-up instance to restore from the specified backup vault. You can select a backed-up instance as needed.

      Backed Up Instance

      Recoverable Tables

      From the Recoverable Tables list, select the name of the table to restore. The names in the list come from the table names that you specified when you created the backup plan. Tables that were not backed up do not appear in the list. A single restore job can restore the data of only one table and its search indexes.

      Note

      When you select a table to restore, if the destination table name does not exist, the restore job creates a new table based on the backed-up table.

      Recoverable Time Point

      From the Recoverable Time Point list, select a recoverable time range. The available time points come from the execution time of the backup plan that you specified when you created the backup.

      Choose Recovery Point

      Select a recoverable point in time. You can drag the timeline slider to specify a point in time.

    2. By default, the system regenerates auto-increment columns and restores search indexes. Modify the restore options as needed.

      Restore option

      Description

      Regenerate auto-increment columns

      Regenerate auto-increment columns for the data table when you restore data. Regenerate Auto-increment Columns is always turned on and cannot be changed.

      Important
      • If the table did not have an auto-increment primary key column when the data was backed up, this configuration has no effect.

      • When you restore a table that has an auto-increment column, the only supported restoration method is to regenerate the auto-increment column, and only putRow operations are restored. In incremental backups, Cloud Backup ignores updateRow and deleteRow operations on tables with auto-increment columns. If you perform multiple putRow operations on the same row in the source table (that is, the values of the other primary key columns are the same except for the auto-increment column), each putRow operation creates a new row after the table is restored because the values of the auto-increment column are regenerated. As a result, the multiple putRow operations become multiple rows in the restored table.

      Restore search indexes

      Specifies whether to restore the search indexes associated with the table when you restore data. Restore Search Indexes is turned on by default. If you do not need to restore the search indexes associated with the table, turn off Restore Search Indexes.

      Important

      If the table did not have a search index when the data was backed up, this configuration has no effect.

    3. Click Next.

  3. Configure Destination Instance.

    image.png

    Parameter

    Description

    Specified Account

    Specify the account to which the destination resource belongs. The default value is Current Account. You can select a backup account that you have added. Only one account can be selected. To manage cross-account backups, click Manage cross-account backups.

    Restore to Database

    From the Restore to Database list, select the name of the database to restore. The database names in the list come from all Tablestore resources under the specified account. If you restore to a different Tablestore instance, you can restore Tablestore data across instances in the same region, including across accounts.

    Restore to New Table

    The system generates a new table name for the restored data by default. Modify the table name as needed.

    Important
    • When you restore to the source table, select the same table name as the backup.

    • When you restore across Tablestore instances, make sure that the name of the restored table is not the same as the name of an existing table.

    • The restore job overwrites the rows in the destination table that have the same primary key. Other rows are not affected.

    • If you want to restore data to an existing table, make sure that the schema of the destination table is the same as that of the source table. You must also set an appropriate data version offset and time to live for the destination table to prevent write failures during restoration or data from expiring immediately after restoration. If the schema of the destination table is different from that of the backed-up table, the restoration may fail.

  4. Click OK.

    After the restore job is created, you can view the progress of the restore job in the Restore Jobs tab. In the Status column, view the status of the restore job. When the Status column changes to Completed and the progress reaches 100%, the data restoration is complete.

    After the restoration is complete, you can log on to the Tablestore console to check the restoration status of the data table in the corresponding instance.Restore job

References