Help Center/ TaurusDB/ Best Practices/ Backup and Restoration Best Practices/ Restoring Data of Multiple Deleted Databases
Updated on 2026-05-18 GMT+08:00

Restoring Data of Multiple Deleted Databases

Scenarios

If a large amount of database and table data is lost due to a misoperation and this event has a wide impact, the entire instance must be restored.

If you can identify when the misoperation was performed, restore the instance to that point in time to restore the data. Otherwise, restore the entire instance using backups.

Operation Process

Procedure

Description

Step 1: Create Databases

Create databases on the console.

Step 2: Create Tables and Insert Data

Create tables and insert data using DAS.

Step 3: Delete the Databases

Delete the databases on the console.

Step 4: Restore Database Data

Restore the deleted database data from backups.

Step 5: Check the Restoration Results

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

Step 1: Create Databases

  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. Then repeat this process to create another database named design_patterns.

Step 2: Create Tables 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. After the connection test is successful, click Log In.
  6. On the top menu bar, choose SQL Operations > SQL Query.
  7. Run the following SQL statements to create tables and insert data into them:

    • Create a table and insert data in database principles.
      • Creating a table
        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;
      • Inserting data
        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');
    • Create a table and insert data in database design_patterns.
      • Creating a table
        CREATE TABLE `creational_pattern` (
          `id` int unsigned NOT NULL,
          `name` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
          PRIMARY KEY (`id`)
        ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
        CREATE TABLE `structural_pattern` (
          `id` int unsigned NOT NULL,
          `name` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
          PRIMARY KEY (`id`)
        ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
        CREATE TABLE `behavioral_pattern` (
          `id` int unsigned NOT NULL,
          `name` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
          PRIMARY KEY (`id`)
        ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
      • Inserting data
        insert into creational_pattern (id,name) VALUES (1001,'Singleton pattern'),(1002,'Abstract Factory'),(1003,'Builder Pattern'),(1004,'Factory Method pattern'),(1005,'Prototype pattern');
        insert into structural_pattern (id,name) VALUES (2001,'Adapter pattern'),(2002,'Bridge pattern'),(2003,'Decorator pattern'),(2004,'Composite pattern'),(2005,'Facade pattern'),(2006,'Flyweight pattern'),(2007,'Proxy pattern');
        insert into behavioral_pattern (id,name) VALUES (3001,'Template method pattern'),(3002,'Command pattern'),(3003,'Iterator pattern'),(3004,'Observer pattern'),(3005,'Mediator pattern'),(3006,'Memento pattern'),(3007,'Interpreter pattern'),(3008,'State pattern'),(3009,'Strategy pattern'),(3010,'Chain-of-responsibility pattern'),(3011,'Visitor pattern');

Step 3: Delete the Databases

  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. On the displayed page, locate databases principles and design_patterns, respectively, and click Delete in the Operation column.
  7. In the displayed dialog box, enter DELETE as prompted and click OK.

Step 4: Restore Database Data

If you can identify which database is deleted by mistake, restore its tables to a point in time. Otherwise, restore the instance to a point in time.

  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.

  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 displayed page, click Restore to Point in Time.
  6. Select the restoration date and time range, enter a time point within the selected time range, and set Restoration Method to Restore to Original.
  7. Select the confirmation check box and click Next.
  8. Confirm the task details and click OK.

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

  9. Check the restoration results.

    When the instance status changes from Restoring to Available, the restoration is complete.

Step 5: Check the Restoration Results

  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. Check that the deleted database is displayed in the database list.
  6. Return to the instance list and click Log In in the Operation column of the target instance.
  7. In the displayed dialog box, enter the password and click Test Connection.
  8. After the connection test is successful, click Log In.
  9. Check the database name and table data to verify if the restoration is complete.