Help Center> GaussDB(for MySQL)> User Guide> Data Backups> Configuring a Same-Region Backup Policy
Updated on 2024-05-21 GMT+08:00

Configuring a Same-Region Backup Policy

Scenarios

When you create a GaussDB(for MySQL) instance, an automated backup policy is enabled by default and cannot be disabled. However, it can be modified after instance creation is complete. GaussDB(for MySQL) backs up data based on the automated backup policy you specify.

GaussDB(for MySQL) backs up data at the instance level. If a DB instance is faulty or data is damaged, you can still restore it using backups to ensure data reliability. Backing up data affects the database read and write performance, so you are advised to set the automated backup time window to off-peak hours.

After an automated backup policy is configured, full backups are created based on the time window and backup cycle specified in the policy. The time required for creating a backup depends on how much data there is in the instance. Backups are stored for as long as you specified in the backup policy.

You do not need to configure incremental backup policies because the system automatically performs an incremental backup every 5 minutes. The generated incremental backups can be used to restore the database and table data to a specified point in time.

Constraints

  • Rebooting instances is not allowed during the creation of a full backup. Exercise caution when selecting a backup time window.
  • When starting a full backup task, GaussDB(for MySQL) first tests connectivity to your instance. If the backup lock failed to be obtained from the DB instance, the verification fails and a retry is automatically performed. If the retry fails, the backup will fail.
  • Performing a full backup may decrease instance throughput because it occupies node resources, especially disk bandwidth.

Viewing or Modifying a Same-Region Backup Policy

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page, choose Databases > GaussDB(for MySQL).
  4. On the Instances page, click the instance name to go to the Basic Information page.
  5. Choose Backups in the left navigation pane, click Configure Same-Region Backup Policy. You can view the configured backup policy. To modify the backup policy, adjust the parameter values as needed.

    Figure 1 Modifying backup policies
    Table 1 Parameter description

    Parameter

    Description

    Retention Period

    Number of days that your automated backups can be retained. The retention period is from 1 to 732 days and the default value is 7.

    • Extending the retention period improves data reliability. You can configure the retention period if needed.
    • If you shorten the retention period, the new backup policy takes effect for existing backups. Any backups (including full and automated backups) that have expired will be automatically deleted. Manual backups will not be automatically deleted but you can delete them manually.
    NOTE:

    To extend the retention period to 3,660 days, contact customer service.

    Time Zone

    The backup time is in UTC format. The backup time segment changes with the time zone during the switch between the DST and standard time.

    Time Window

    A one-hour period the backup will be scheduled within 24 hours, such as 01:00-02:00 or 12:00-13:00.

    Backup Cycle

    By default, each day of the week is selected. You can change the backup cycle and must select at least one day of the week.

    Policy for automatically deleting full backups:

    To ensure data integrity, even after the retention period expires, the most recent backup will be retained, for example, if Backup Cycle was set to Monday and Tuesday and Retention Period was set to 2:

    • The full backup generated on Monday will be automatically deleted on Thursday. Because:

      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. Because:

      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.

  6. Click OK.