Configuring an Automated Backup Policy for GaussDB
Scenarios
When you create a GaussDB instance, an instance-level automated backup policy is enabled by default. After your instance is created, you can modify the automated backup policy as needed. GaussDB backs up data based on the automated backup policy you specified.
If a database is faulty or data is damaged, you can restore it from backups to ensure data reliability. Backups are saved as packages in OBS buckets to ensure data confidentiality and durability. Since backing up data affects the database read and write performance, you are advised to perform automated backups during off-peak hours.
- Retention period: 7 days by default.
- Time window: An hour within 24 hours, such as 01:00-02:00 or 12:00-13:00. The backup time is in UTC format. If the DST or standard time is switched, the backup time segment changes with the time zone.
- Backup cycle: Monday to Sunday by default.
- Differential backup policy: Backup files are saved every 30 minutes by default.
- Backup flow control: The default value is 75 MB/s.
- Prefetch pages: The default value is 64.
- Standby node backup: This option is enabled by default.
To ensure that data can be restored to a point in time, the latest full backup that exceeds the backup retention period will not be deleted immediately. For example, if Backup Cycle is set to All and Retention Period to one day and backup 1 is generated on November 1, this backup will not be deleted on November 2 when backup 2 is generated, but will be deleted on November 3 when backup 3 is generated.
Constraints
The instance-level automated backup policy cannot be configured for GaussDB single-replica instances of versions earlier than V2.0-3.0.
Billing
Backups are saved as packages in OBS buckets. For the billing details, see How Is GaussDB Backup Data Charged?
Modifying an Automated Backup Policy
- Log in to the management console.
- Click in the upper left corner and select a region and project.
- Click in the upper left corner of the page and choose .
- On the Instances page, click the name of the target instance to go to the Basic Information page.
- In the navigation pane on the left, choose Backups. On the displayed page, click Modify Backup Policy. You can view the configured backup policy. To modify the backup policy, adjust the parameter values as needed.
Figure 1 Modifying the backup policy
- Configure parameters.
- Full backup policy:
- Retention Period: Specify Retention Period, which indicates the number of days that your automated backups can be retained. Increasing the retention period will improve data reliability. The default value is 7. However, even if the retention period has expired, the most recent backup will be retained.
- Extending the retention period improves data reliability. You can extend the retention period as needed.
- If you shorten the retention period, the new backup policy takes effect for existing backups. Any automated backups (including full and incremental backups) that have expired will be automatically deleted. Manual backups will not be automatically deleted but you can delete them manually.
Policy for automatically deleting automated full backups:
To ensure data integrity, even after the retention period expires, the most recent backup will be retained.
If Backup Cycle was set to Monday and Tuesday and the Retention Period was set to 2:
- The full backup generated on Monday will be automatically deleted on Thursday. The reasons are as follows:
The backup generated on Monday expires on Wednesday, but it was the last backup, so it will be retained until a new backup expires. The next backup will be generated on Tuesday and will expire on Thursday. So the full backup generated on Monday will not be automatically deleted until Thursday.
- The full backup generated on Tuesday will be automatically deleted on the following Wednesday. The reasons are as follows:
The backup generated on Tuesday will expire on Thursday, but as it is the last backup, it will be retained until a new backup expires. The next backup will be generated on the following Monday and will expire on the following Wednesday, so the full backup generated on Tuesday will not be automatically deleted until the following Wednesday.
- Backup Flow Control: Specify the rate at which data is uploaded from the data disk of the instance to the backup storage device (such as OBS). The default rate is 75 MB/s. The value 0 indicates that the upload rate is not limited. However, the actual upload rate is still restricted by factors such as the network, instance specifications, and disk I/O.
- Standby Node Backup: If this policy is enabled, full and differential backups of the instance are performed on the host where the standby DN resides.
- Time Window: An hour within 24 hours, such as 01:00-02:00 or 12:00-13:00. The backup time is in UTC format. If the DST or standard time is switched, the backup time segment changes with the time zone.
- Backup Cycle: Select at least one day from Monday to Sunday as required. By default, all options are selected.
The backup retention period is from 1 to 732 days. To extend the retention period, contact technical support. Automated backups can be retained for up to 2,562 days.
A time window is one hour. A total of 24 time windows are available. You are advised to select an off-peak time window for full backups. By default, each day of the week is selected for Backup Cycle. You can change the backup cycle. At least one day must be selected.
A full backup is immediately triggered after a DB instance is created. Then, a full backup or differential backup is performed based on the time window and backup cycle you specified. We recommend that you set the automated backup time window to an off-peak hour.
- Retention Period: Specify Retention Period, which indicates the number of days that your automated backups can be retained. Increasing the retention period will improve data reliability. The default value is 7. However, even if the retention period has expired, the most recent backup will be retained.
- Differential backup policy:
- Backup Cycle: Select the backup cycle for performing a differential backup. The default value is 30 minutes.
- Prefetch Pages: Set the number of prefetch pages from the modified pages in the disk table file during a differential backup. The default value is 64. When modified pages are adjacent (for example, with a bulk data load), you can set this parameter to a large value. When modified pages are scattered (for example, random update), you can set this parameter to a small value. If this parameter is set to a large value, the occupied I/O increases. In this case, other services are affected and the database performance deteriorates.
- Full backup policy:
- Click OK.
- Check the result.
After the task is submitted, click Modify Backup Policy to check whether the modification is successful.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot