Backup Mode

Last updated: 2020-02-25 17:01:57

PDF

Backup Overview

Backup modes

TencentDB for MySQL HA Edition supports Auto backup And Manual backup Of databases.

Backup Type

TencentDB for MySQL High-Availability Edition supports two backup types:

  • Physical backup , which is a full copy of physical data (supported for both auto backup and manual backup).
  • Logical backup , which backs up SQL statements (only supported for manual backup).
  • To restore a database from a physical backup, you need to use xbstream to decompress the package first. For more information, see Restoring a Database from a Physical Backup .
  • If the number of tables in a single instance exceeds one million, backup may fail, and database monitoring may be affected. Please control the number of tables in one single instance appropriately and make sure that it is below one million.
  • As the data of tables created by the MEMORY storage engine is stored in the memory, physical backups cannot be created for such tables. To avoid data loss, it is recommended to replace them with InnoDB tables.
Physical Backup Advantages Logical Backup Disadvantages
  • High backup speed.
  • Streaming backup and compression are supported.
  • High success rate.
  • Simple and efficient restoration.
  • Faster backup-based coupling operations such as adding real-only and disaster recovery instances.
  • 1/8 of average time needed for creating a logical backup.
  • 10 times faster than logical backups during import.
  • Long time needed to restore as it takes time to run SQL and build indexes.
  • Low backup speed, especially when there are massive amounts of data.
  • Possible increase in master-slave delay due to the pressure on instances during backup
  • Possible loss of precision information of floating points.
  • Potential backup failures due to wrong views and other problems.
  • Slower backup-based coupling operations such as adding read-only and disaster recovery instances.
  • Backup Objects

    Data Backup Log Backup
    MySQL v5.5, 5.6, and 5.7 (High-Availability Edition):
  • Auto backup supports full physical backup.
  • Manual backup supports full physical backup, full logical backup, and single-database/table logical backup.
  • Both auto backup and manual backup can be compressed and downloaded.
  • Auto backups cannot be manually deleted, but their retention periods can be set.
  • Manual backups can be manually deleted and will be retained until they are deleted.
  • MySQL v5.5, 5.6, and 5.7 (High-Availability Edition):
  • Log files occupy the instance's backup capacity.
  • Log files can be downloaded but cannot be compressed.
  • Retention periods can be set for log files.
  • Notes

    • Starting from February 26, 2019, the auto backup feature of TencentDB for MySQL will only support physical backup (default type) and no longer provide logical backup. Existing automatic logical backups will be switched to physical backups automatically.
      This will not affect your business access, but may have impact on your auto backup habit. If you need logical backups, you can use the manual backup method in the TencentDB for MySQL Console Or Call the relevant API To generate logical backups.
    • Both logical and physical backup files will be compressed, so some files may be unusable after being downloaded. In that case, you can use the table backup function in manual logical backup. For more information, see Manual backup .
    • Instance backup files occupy backup capacity. Backup capacity, we will inform you in advance. Please develop a backup schedule and plan the backup capacity appropriately to avoid potential extra fees in the future.
    • It is recommended to back up your database during off-hours.
    • To avoid situations where the required backup files are deleted after the retention period lapses, please download them to the local file system in a timely manner.
    • DDL operations are prohibited during the backup process so as to avoid backup failure due to table locking.
    • Excessive backup space will be billed successively starting from 00:00, November 22, 2019. For more information, see Backup Space Billing Notification .

    Backing up MySQL Data Automatically

    1. Log in to the TencentDB for MySQL Console , click an instance name on the instance list page to enter the management page, and select Backup and Restore > Auto Backup Settings .

    2. Select backup parameters in the pop-up window as detailed below and click OK :

    Rollback function Based on the backup cycle and the backup files within the backup retention days, shortening the automatic backup frequency and retention days will affect the Rollback feature of instance data. Please weigh the backup configuration.

    ParameterDESCRIPTION
    Backup cycleTo ensure the security of your data, please set up backup at least twice a week. The default is Monday to Sunday.
    Backup time
    • The default time is the backup initiation time of the system automatic Assign.
    • You can customize the selection time range, and it is recommended to set it to the business peak period. The backup initiation time is only the time when the backup starts with Launch and does not represent the end time of the backup.
      For example, if you choose 02:00-06: 00:00, the system will initiate a backup at a point in time in the time range of 02:00-06:00, depending on the backend backup strategy and backup system status of point in time.
    Data backup retention periodData backup files can be retained for 7 (default value) to 732 days.
    Log backup retention periodLog backup files can be retained for 7 (default value) to 732 days (backup capacity is currently available free of charge).The number of days set for log backup retention must be smaller than that for data backup retention.

    Backing up MySQL Data Manually

    The manual backup feature allows you to initiate a backup task manually.

    • Manual backup supports full physical backup, full logical backup, and single-database/table logical backup.
    • You can delete manual backups to release backup capacity.
    1. On the instance list page, click an instance name to enter the management page, and select Backup and Restore > Manual Backup .
    2. Select backup modes and objects in the pop-up window and click OK .

    For logical single-database/table backup, select the database or table to be backed up in Select database & table In the left column and add the selected item to the right column. If you don't have a database, please create a database/table first.