tencent cloud

Feedback

Database/Table-Level Rollback to the Original Cluster

Last updated: 2024-09-06 11:55:14
    TDSQL-C for MySQL supports restoring data from logical backups. Its console provides a convenient operation interface for you to easily achieve fast data restoration. The logical backups can be used for database/table-level rollback to the original cluster and entire cluster rollback to a new cluster. This document introduces how to roll back databases/tables to the original cluster from logical backups through the console.

    Feature Limits

    For database-level rollback, the types of objects that cannot be imported include foreign key constraint, check constraint, trigger, stored procedure, user view, and event.

    Rollback Modes

    Rollback by backup file: Restores the cluster to the dataset state of a specific snapshot backup file. The selection range of the backup file depends on the data backup retention period you set.
    Rollback by time point: Restores the cluster to any time point. The selection range of the time point depends on the log retention period you set.
    Note:
    During rollback by time point, the system will preferentially use snapshot backups for rollback. If no snapshot backup file is found, logical backups will be used. If you need to perform rollback strictly based on the backup file type (logical backup or snapshot backup), it is recommended to select rollback by backup file.

    Prerequisites

    A logical backup is already available for the original cluster. To generate a logical backup, you can refer to the steps of generating a logical backup in each document under Performing Backup.
    The cluster is in the running status.

    Directions

    1. Log in to the TDSQL-C for MySQL console and click the Cluster ID in the cluster list to enter the cluster management page.
    2. On the cluster management page, select the Backup Management tab and click Roll Back.
    
    3. On the rollback page, complete the following configuration and click Roll Back.
    Note:
    For database/table rollback, you need to specify the database/table to be rolled back. If you cannot determine all the databases/tables involved, it is recommended to perform entire cluster rollback to a new cluster, and after confirmation, migrate the data back to the original cluster through DTS.
    If the database/table to be rolled back does not exist at the specified time point, the rollback will fail.
    If the database/table to be rolled back does not exist or has been deleted by mistake, you need to first log in to the database and create a database/table, and then perform rollback through the console.
    If the specified database/table to be rolled back has primary or foreign key constraints, make sure that the associated databases/tables exist during the rollback process, otherwise the rollback will fail.
    Up to 500 databases or tables can be rolled back at a time.
    
    Parameter
    Description
    Select a rollback type
    Select Rollback to Original Cluster.
    Rollback Mode
    Supports selecting rollback by backup file or by time point.
    Backup File
    If the rollback mode is set to rollback by backup file, you need to select an existing logical backup file for rollback, and then select the database/table to be rolled back.
    Rollback Method
    If the rollback mode is set to rollback by time point, you need to select a rollback method.
    Fast: If your table has a foreign key, select the fast rollback method.
    Faster Rollback: Imports the full backup of the instance, and then rolls back the selected databases and tables. This rollback method has no limitation but is relatively slow.
    Ultrafast: Tables with foreign keys are not supported in the ultrafast rollback method. If your table has a foreign key, select the fast rollback method.
    Rollback Time
    If the rollback mode is set to rollback by time point, you need to select a rollback time point.
    Databases/Tables to Roll Back
    Select the database/table to be rolled back. You can search by database or table name and rename the selected database. If you have not renamed it, the system will name the new database as original database name_bak by default.
    4. In the pop-up dialog box, confirm no errors and then click OK to initiate the rollback task.
    5. After the task is submitted, you can click View Rollback Task or go to the task list to view the rollback progress and task details.
    6. After the rollback is completed, you can see the new database/table created through restoration in the original cluster and perform further operations.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support