Updated on 2026-05-18 GMT+08:00

Restoring Data of Deleted Tables

Scenarios

Some table data is lost due to misoperations. This section describes how to restore table data on the console.

Operation Process

Procedure

Description

Step 1: Create a Database

Create a database on the console.

Step 2: Create a Table and Insert Data

Create a table and insert data using DAS.

Step 3: Delete Table Data

Log in to DAS and delete the tables.

Step 4: Restore Table Data

Restore the deleted table data using table-level PITR.

Step 5: Check the Restoration Results

Log in to the DAS and check whether the data is restored.

Notes

Data on the original instance will be overwritten. The original instance will be unavailable during the restoration, so restore data during off-peak hours.

Step 1: Create a Database

  1. Log in to the console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page and choose Databases > TaurusDB.
  4. On the Instances page, click the instance name.
  5. In the navigation pane, choose Databases.
  6. Click Create Database. In the displayed dialog box, enter the database name principles and click OK.

Step 2: Create a Table and Insert Data

  1. Log in to the console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page and choose Databases > TaurusDB.
  4. On the Instances page, locate the instance and click Log In in the Operation column.

    Alternatively, click the instance name on the Instances page. On the displayed Basic Information page, click Log In in the upper right corner.

  5. Enter the database username and password and click Test Connection.
  6. After the connection test is successful, click Log In.
  7. On the top menu bar, choose SQL Operations > SQL Query.
  8. Run the following SQL statements to create a table and insert data into it:

    Create a table and insert data in database principles.
    CREATE TABLE `solid_principle` (
      `abbr` varchar(32) COLLATE utf8mb4_general_ci NOT NULL,
      `name_en` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
      `name_cn` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
      PRIMARY KEY (`abbr`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
    insert into solid_principle (abbr,name_en,name_cn) VALUES 
    ('S','Single Responsibility Principle','Single Responsibility Principle'),('O','Open Close Principle','Open Close Principle'),('L','Liskov Substitution Principle','Liskov Substitution Principle'),('I','Interface Segregation Principle','Interface Segregation Principle'),('D','Dependency Inversion Principle','Dependency Inversion Principle');

Step 3: Delete Table Data

  1. Log in to the console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page and choose Databases > TaurusDB.
  4. On the Instances page, locate the instance and click Log In in the Operation column.

    Alternatively, click the instance name on the Instances page. On the displayed Basic Information page, click Log In in the upper right corner.

  5. Enter the database username and password and click Test Connection.
  6. After the connection test is successful, click Log In.
  7. On the top menu bar, choose SQL Operations > SQL Query.
  8. Select database principles and run the following SQL statement to delete table data.

    delete from `solid_principle`;

Step 4: Restore Table Data

  1. Log in to the console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page and choose Databases > TaurusDB.
  4. On the Instances page, click the target instance name.
  5. In the navigation pane, choose Backups. On the Full Backups tab page, choose More > Restore Table above the backup list.
  6. On the displayed page, set the restoration date, time range, time point, and tables to be restored.

    • After the restoration is complete, new tables with timestamps appended as suffixes to original table names are generated in the instance. You can rename the new tables, but the table names must be unique.
    • Time-specific table: The tables to be restored are read from the latest full backup before the selected time point. Recent table: The tables to be restored are read from the selected time point.
    • Tables created after the latest full backup are not displayed in the time-specific table list. You can select Recent table to view the latest table details.
    • If the tables to be restored are not found or are deleted by mistake, you need to log in to the database and create tables with the same names. Then, the tables to be restored will be displayed when you select Recent table.

  7. Click Next: Confirm. On the displayed page, confirm the information about the tables to be restored and click Restore Now.
  8. On the Instances page, view the instance status, which is Restoring. During the restoration, workloads are not interrupted.

    You can also view the progress and result on the Task Center page.

Step 5: Check the Restoration Results

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page and choose Databases > TaurusDB.
  4. On the Instances page, locate the instance and click Log In in the Operation column.
  5. In the displayed dialog box, enter the password and click Test Connection.
  6. After the connection test is successful, click Log In.
  7. Check the table data of the database to verify if the restoration is complete.