tencent cloud

Feedback

Backup and Rollback Overview

Last updated: 2024-08-21 16:38:40
    Data is the core asset of enterprises. As your business develops, your data grows in a large-scale and explosive manner. Business applications require real-time, online, and fast data processing. It is more and more challenging for database Ops engineers to protect the data integrity, as data loss may occur for a variety of causes, such as accidental deletion, system vulnerabilities and viruses, hardware failures, and even natural disasters. Therefore, backup and rollback are of significant importance to databases.

    Backup Overview

    TDSQL-C for MySQL supports data backup and binlog backup. A complete data backup supplemented by a follow-up binlog backup allows you to restore the entire TDSQL-C for MySQL cluster or specified databases/tables to any time point.
    You can visually query the field information in the data backup list, such as file name/alias, backup time, start time, end time, backup type, backup mode, backup size, status, and operation. You can also query similar fields in the binlog backup list, including file name, binlog backup start time, binlog backup end time, backup size, and operation. This helps you easily view and manage historical backups.
    The backup and rollback console UI is as shown below:
    
    

    Data backup

    Data backup means generating a backup file containing all the data in a cluster at a specific time point. TDSQL-C for MySQL supports logical backup and snapshot backup. The former is a full backup, while the latter is a full + incremental backup.
    Logical backup: It supports full backup only, where the logical structure and content of a database are stored as SQL statements. It backs up database objects, including tables, indexes, and stored procedures. This mode features a more refined backup granularity at the database or table level and a lower impact on the performance; however, it is slow and space-intensive.
    Snapshot backup: It uses the redirect-on-write (ROW) technology to take snapshots of the disks at the storage layer for backup. It features fast backup in seconds, imperceptibility to the computing layer, and low space usage.
    Full backup: It copies all the data at a specific time point.
    Incremental backup: It backs up only new or modified files based on the last backup.

    Backup types

    Backup Type
    Strengths/Shortcomings
    Object
    Mode
    Download
    Deletion
    Logical backup
    Full backup
    Strengths: The backup is at the database or table level, with a smaller impact on the database performance.
    Shortcomings: The backup task locks the database, takes a long time, and uses a lot of space.
    Objects such as tables, indexes, and stored procedures, as well as the entire cluster
    Manual
    Snapshot backup
    Full backup
    Strengths: The backup task can be completed in seconds and imperceptible to the business, with a small space used.
    Shortcomings: The backup file cannot be downloaded.
    The entire cluster
    Manual
    ×
    ×
    Automatic
    ×
    ×
    Incremental backup
    Automatic
    ×
    ×

    Binlog backup

    Backup Type
    Strengths/Shortcomings
    Object
    Mode
    Download
    Deletion
    Binlog backup
    Incremental backup
    Strengths: Incremental data is recorded and can be restored to any time point.
    Shortcomings: The binlog backup task lowers the instance's write performance.
    The entire cluster
    Automatic
    x
    A binlog backup is the incremental data generated after all the data in the cluster is backed up to a file at a specific time point. TDSQL-C for MySQL generates a large number of binlogs when executing large transactions or lots of DML operations, which are uploaded to the cloud storage and displayed in the binlog backup list in the console. The binlog backup mode applies to operation log storage.
    TDSQL-C for MySQL relies on redo logs rather than binlogs for rollback, so that even if binlog is disabled, data can still be rolled back to any time point, and the instance performance can be increased by over 30%.
    Note:
    Currently, TDSQL-C for MySQL doesn't support disabling binlog backup, which will be made available after the network architecture upgrade is completed.

    Note

    Only one manual backup task can be performed per hour. Automatic backup tasks are performed according to your configuration, which is once per day by default.
    Manual backup files can be manually deleted from the backup list. They are retained as long as they are not deleted; therefore, regularly delete those no longer needed to free up the space.
    For the backup methods, snapshot back files generated by automatic backups do not support manual deletion, which can be automatically deleted after the expiration of the set retention period for automatic backups. Logical backup files generated by automatic backups support manual deletion. In the absence of such manual intervention, backup files will be reserved in the backup list. To prevent waste, manually delete unnecessary files regularly.
    You can query the binlog backup size in the log backup list. The total binlog backup size is the sum of sizes of all binlog backups.

    Rollback Overview

    TDSQL-C for MySQL supports data restoration to a specific time point through the rollback feature, minimizing potential system losses. TDSQL-C for MySQL can roll back databases/tables to the original cluster and roll back an entire cluster (clone) to a new cluster. You can choose different rollback methods based on your business needs.

    Rollback Method

    Rollback by backup file: This method restores the cluster to the data file state of a backup file. The selection range of the backup file is determined by the data backup retention period you set.
    Rollback by time point: This method restores the cluster to any time point within the binlog backup retention period you set.
    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