Last updated: 2020-02-25 17:01:57PDF
TencentDB for MySQL HA Edition supports Auto backup And Manual backup Of databases.
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|
|Data Backup||Log Backup|
|MySQL v5.5, 5.6, and 5.7 (High-Availability Edition):
||MySQL v5.5, 5.6, and 5.7 (High-Availability Edition):
- 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
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 .
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.
|Backup cycle||To ensure the security of your data, please set up backup at least twice a week. The default is Monday to Sunday.|
|Data backup retention period||Data backup files can be retained for 7 (default value) to 732 days.|
|Log backup retention period||Log 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.
- On the instance list page, click an instance name to enter the management page, and select Backup and Restore > Manual Backup .
- 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.