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

Restoring Data of a Deleted Instance

Scenarios

If an instance is deleted by mistake, you can rebuild it or use manual backups to restore its data.

This section uses pre-provisioned data to simulate an accidental deletion, guiding you through the entire process of restoring instance 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 the Instance

Delete the instance.

Step 4: Restore the Instance

Rebuild the instance from the recycle bin or restore the instance using a backup.

Step 6: Check the Restoration Results

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

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 a database name (for example, 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. After the connection test is successful, click Log In.
  6. On the top menu bar, choose SQL Operations > SQL Query.
  7. Select database principles and run the following SQL statements to create a table and insert data into it:

    • 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');

  8. Query table data.

    SELECT *  FROM solid_principle;

Step 3: Delete the Instance

  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 you want to delete and click More > Delete in the Operation column.

    Alternatively, click the instance name to go to the Basic Information page. In the upper right corner of the page, click and choose Delete.

  5. In the displayed dialog box, enter DELETE and click OK. Refresh the Instances page later to check that the deletion is successful.

Step 4: Restore the Instance

Rebuild the instance from the recycle bin within the retention period, or restore it from backups.

  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 Recycle Bin page, locate the instance you want to rebuild and click Rebuild in the Operation column.
  5. On the displayed page, configure the new instance settings.
  6. Click Next.
  7. Confirm the information and click Submit.
  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. In the navigation pane, choose Backups. On the displayed page, locate the latest manual backup and click Restore in the Operation column.
  5. Select where you want to restore the backup to:

    • Create New Instance: Select this option if you want to restore the backup to a new instance.
      1. Set Restoration Method to Create New Instance and click OK.
        Figure 1 Restoring to a new instance

      2. On the displayed page, set the new instance parameters and click Next.
        • The region and DB engine version of the new instance must be the same as those of the original instance and cannot be changed.
        • Retain the default database port 3306.
        • Retain the default values for other parameters, or set them as required. For details, see Buying an Instance.
    • Restore to Existing: Select this option if you want to restore the backup to an existing instance.
      1. Set Restoration Method to Restore to Existing, select the confirmation check box, select the target existing instance, and click Next.
        Figure 2 Restoring to an existing instance

      2. Confirm the task details and click OK.
        • Restoring to an existing instance will overwrite its data and root password. The existing instance will be unavailable during the restoration. The existing instance must have the same DB engine type, version, and table name case sensitivity as the original instance.
        • If you fail to connect to the existing instance using its original password after the restoration, reset the password.

  6. Check the restoration results.

    • Restoring to a new instance

      A new instance is created, with data restored to the point in time when the backup was taken. When the instance status changes from Creating to Available, the restoration is complete.

      The new instance is independent of the original one. If you want to offload read pressure from the primary node, create read replicas for the new instance.

      A full backup is triggered when the restoration is complete.

    • Restoring to an existing instance

      On the Instances page, the status of the target instance changes from Restoring to Available. If the existing instance contains read replicas, the read replica status is the same as the existing instance status.

      A full backup is triggered when the restoration is complete.

Step 6: 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, 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. Check the database name and table data to verify if the restoration is complete.