Feature Overview
MySQL Backup is a SCF-based feature provided by COS. It allows you to store data in TencentDB for MySQL to COS so that data can be stored persistently and protected from data loss or corruption. After you set a backup function rule for a bucket, SCF will scan your MySQL backup files periodically and store them in the bucket.
Supports and Limits
MySQL Backup functions only back up the backup files of TencentDB for MySQL. Therefore, if MySQL backup has not been enabled, the functions cannot be executed. For more information about TencentDB for MySQL backups, see Backing up Databases.
If you have previously added a MySQL backup rule for a bucket in the COS console, you can view the created MySQL backup function in the SCF console. Please do not delete this function, as it may cause your rule to become ineffective.
All regions with SCF support MySQL data backup, including Guangzhou, Shanghai, Beijing, Chengdu, Hong Kong, Singapore, Mumbai, Toronto, Silicon Valley, and more. For additional supported regions, please refer to the SCF product documentation.
Instructions
Setting backup through application integration
1. Log in to the COS Console.
2. In the left navigation pane, click Application Integration > Data Backup and locate MySQL Backup.
3. Click Configure Backup Rule to go to the rule configuration page.
4. Click Add Function.
Note
If you have not activated the SCF service, please go to the SCF console to activate it and follow the instructions to complete the service authorization.
5. In the pop-up window, configure the following items:
Function Name: Uniquely identifies a function and cannot be modified after being set. You can view the function in the SCF console.
Associated Bucket: A bucket to store the MySQL backup files.
Note
The MySQL data to be backed up must be in the same region as the associated bucket.
Trigger Period: Triggers the backup operation for the MySQL Backup function. Every day, every week, and custom periods are supported.
Cron Expression: If you use a custom period, you can use Cron to specify the trigger period rule. Cron follows China Standard Time (UTC+8:00). For detailed configuration policies, see Cron Documentation.
Database Instance: MySQL instance in the region where the current bucket resides.
Delivery Path: Delivery path prefix of the backups. If not specified, backups will be stored in the root directory of the bucket.
SCF Authorization: SCF needs to be authorized so that it can read the MySQL instances as well as their backup files, and store the backup files to the specified bucket.
6. After adding the configuration, click Confirm to see that the function has been added successfully. You can perform the following operations on the newly created function:
Click Log to view the historical running status of MySQL backup. If an error is reported, you can click Log to quickly redirect to the SCF console for viewing the error log details.
Click More > Edit to modify the MySQL backup rule.
Click More > Delete to remove unused MySQL backup rules.
Setting backup via bucket configuration
1. Log in to the COS Console.
2. In the left navigation, select Bucket List, click the bucket you want to set up MySQL backup for, and enter the bucket management page.
3. Click Function Service on the left and find MySQL Backup Function.
Note
If you have not activated the SCF service, please go to the SCF console to activate it and follow the instructions to complete the service authorization.
4. Click Add Function.
5. In the pop-up window, configure the following items:
Function Name: Uniquely identifies a function and cannot be modified after being set. You can view the function in the SCF console.
Trigger Period: Triggers the backup operation for the MySQL Backup function. Every day, every week, and custom periods are supported.
Cron Expression: If you use a custom period, you can use Cron to specify the trigger period rule. Cron follows China Standard Time (UTC+8:00). For detailed configuration policies, see Cron Documentation.
Database Instance: MySQL instance in the region where the current bucket resides.
Delivery Path: Delivery path prefix of the backups. If not specified, backups will be stored in the root directory of the bucket.
SCF Authorization: SCF needs to be authorized so that it can read the MySQL instances as well as their backup files, and store the backup files to the specified bucket.
6. After adding the configuration, click Confirm to see that the function has been added successfully. You can perform the following operations on the newly created function:
Click Log to view the historical running status of MySQL backup. If an error is reported, you can click Log to quickly redirect to the SCF console for viewing the error log details.
Click More > Edit to modify the MySQL backup rule.
Click More > Delete to remove unused MySQL backup rules.