Help Center/ TaurusDB/ User Guide/ Data Backups/ Creating an Automated Backup/ Configuring a Same-Region Backup Policy
Updated on 2024-11-06 GMT+08:00

Configuring a Same-Region Backup Policy

Scenarios

When you create a GaussDB(for MySQL) instance, the automated backup policy is enabled by default. 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 DB 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

  • The automated backup policy is enabled by default and cannot be disabled.
  • 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.

Backup Clearing

To ensure data integrity, even after the retention period expires, the most recent full 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.

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 project.
  3. Click in the upper left corner of the page and choose Databases > GaussDB(for MySQL).
  4. On the Instances page, click the instance name.
  5. In the navigation pane, choose Backups.
  6. On the displayed Full Backups tab, click Configure Same-Region Backup Policy.

    Figure 1 Configuring a same-region backup policy

  7. In the displayed dialog box, view the current backup policy. To modify the backup policy, adjust the parameter values by referring to Table 1.

    Figure 2 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, submit an application by choosing Service Tickets > Create Service Ticket in the upper right corner of the management console.

    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.

  8. Click OK.