Overview
Redis data backup is a database backup feature provided by Tencent Cloud Object Storage (COS) based on Serverless Cloud Function (SCF). It helps users archive backup files from Tencent Cloud Distributed Cache to COS for persistent storage, to prevent data loss or corruption. When users configure backup rules in a specified bucket, SCF periodically scans your Redis backup files and archives them to the bucket. Must-Knows
The Redis data backup function backs up the backup files of Tencent Cloud Distributed Cache. If you have not enabled Redis database backup, you cannot execute the backup function. For more information about Tencent Cloud Distributed Cache backup, you can view configure backup rules. If you have previously added Redis data backup rules for a bucket on the COS console, you can view the created Redis data backup function on the SCF console. Please do not delete this function, as this may cause your rules to become invalid. The current feature only supports regions where both COS and SCF are available. Some regions (such as Chongqing) are not supported. For specifics, refer to the regions displayed on the COS and SCF consoles.
Operation Steps
2. In the left navigation, click Application Integration > Data Backup to go to the Application Integration Management page.
Note:
In addition to the above feature entries, you can also click Bucket List, select the corresponding bucket name, choose Function Compute > Redis Backup Function, to go to the add function configuration page.
3. Find Redis Backup, click Configure Backup Rules to go to the Rule Configuration page.
4. Click Add Function.
Note:
If you have not activated SCF service, please go to the SCF console to activate the service and follow the prompts to complete the service authorization. 5. Configure the following information in the pop-up window:
Function name: Serves as the unique identifier name for the function and cannot be modified after creation. You can view the function on the SCF console. Associated Bucket: The bucket that stores Redis backup files. If configured in the Function Compute feature of the specified bucket, this configuration item is not available.
Trigger Period: The Redis data backup function uses a scheduled trigger to initiate backup and archiving operations. The trigger period supports daily or custom cycles.
Note:
For example, a user configured a Redis backup rule on July 3, 2023, specifying to back up Redis instance files to COS daily at 00:00.
Then, the SCF will start running at approximately 00:00:03 on July 4, 2023 (there is a delay of a few seconds when SCF starts), scan the Redis instance files from the last 3 days, and then upload them to COS.
The SCF runs at 2023-07-04 00:00:03, so the final backup file time range is: 2023-07-01 00:00:00 to 2023-07-04 00:00:03.
Cron Expression: When the trigger period is set to custom, you can specify the exact trigger schedule rules via Cron. Cron currently runs on UTC +8 China Standard Time (Beijing Time). For detailed configuration policies, see Cron-related documentation. Database Instance: The list of Redis database instances in the region where the current bucket is located.
Delivery Path: The prefix for the backup file delivery path. If left blank, files will be saved in the bucket's root path by default.
SCF Authorization: Redis data backup requires authorizing SCF to read database instances and their backup files from your Redis backups and archive the backup files to your specified bucket. Therefore, you need to add this authorization.
6. After adding the configuration, click Confirm, and you will see that the function has been added successfully.
You can perform the following operations on the newly created function:
Click Logs to view the historical runs of Redis data backup. When errors occur during backup, you can also click Logs to quickly navigate to the SCF console and view error details in the logs.
Click Details to view detailed information about the function and trigger.
Click More > Edit to modify Redis data backup rules.
Click More > Trigger to manually trigger Redis data backup rules.
Click More > Delete to remove unused Redis data backup rules.