All Products
Search
Document Center

PolarDB:Overview

Last Updated:Jan 16, 2024

Data is a core asset for enterprises. As business of enterprises grows, data increases exponentially. This requires business applications to be able to process data online and in real time. It becomes more challenging for database O&M personnel to protect the core data of their enterprises, because various factors, such as accidental data deletion, system vulnerabilities, ransomware, hardware failures, and natural disasters, may cause data losses. Therefore, data backup and restoration are important features of databases.

PolarDB supports data backup and physical log backup. Backing up data is a process of creating a backup set (snapshot) of all data on a cluster at a specific point in time. Data backup is a full backup. Backing up logs is a process of recording the new data after a backup set is created. Log backup is an incremental backup. You can restore your PolarDB cluster or a specific instance or table in your cluster to any point in time by using a full data backup set and the redo logs generated after the backup set is created.

Data backup

Data backup are categorized into level-1 backup and level-2 backup based on the storage location.

Storage location

Default configuration

Retention period

Benefit

How to view the size of a backup set

Level-1 backup

Enabled

3 to 14 days

  • Level-1 backup is created based on Redirect-on-Write (ROW) snapshots. These snapshots are stored in the distributed file system of PolarDB. The system does not replicate data when it saves a data block to a snapshot. When a data block is modified, the system saves one of the previous versions of the data block to a snapshot and creates a new data block that is redirected by the original data block. Therefore, you can create backup within a few seconds regardless of the size of your database storage.

  • The backup and restoration features of PolarDB clusters use multi-threading parallel processing and other innovative technologies. This allows you to restore data from a backup set (snapshot) to a new cluster within 10 minutes (or 20 minutes if the hot standby cluster feature is enabled). The time consumed depends on factors such as the amount of data in the database.

Note
  • By default, the level-1 backup feature is enabled, and you cannot disable this feature.

  • The maximum retention period of level-1 backup snapshots is 30 days. If you want to use this feature, contact us for admission to the whitelist.

The following figure shows the total physical storage of level-1 backup.一级备份快照总大小

Note
  • The level-1 backup physical size of a PolarDB cluster is the sum of the dedicated physical storage occupied by all level-1 backup sets, as shown in part ①. The actual storage space of level-1 backup is based on this value.

  • The backup set logical size of a PolarDB cluster is the logical size of a backup set, as shown in part ②. This size is not charged.

  • The data of the PolarDB cluster and multiple level-1 backup sets (snapshots) can be stored in the same physical data block that is billed only once. For more information, see FAQ.

Level-2 backup

Disabled

  • 30 to 7,300 days

  • Enable the Permanently Retain Backups before Cluster Deletion feature to save level-2 backup permanently.

  • Level-2 backup is level-1 backup that are compressed and then stored in on-premises storage. Level-2 backup is slower to restore than level-1 backup. However, level-2 backup is more cost-effective than level-1 backup.

  • If you enable this feature, expired level-1 backup is transferred to on-premises storage and stored as level-2 backup. The backup is transferred at a rate of approximately 150 MB/s.

  • Level-2 backup can be stored in the same region as the PolarDB cluster or in a different region. For more information, see Single-region backup and cross-region backup.

Note

If a level-1 backup expires before the previous one is transferred to a level-2 backup, the level-1 backup is deleted and is not transferred to a level-2 backup. For example, a PolarDB cluster creates level-1 backup at 01:00 every day and retains the backup for 24 hours. If the PolarDB cluster creates Level-1 Backup A at 01:00 on January 1 and creates Level-1 Backup B at 01:00 on January 2. Level-1 Backup A expires at 01:00 on January 2 and starts to be transferred to a level-2 backup. However, Level-1 Backup A stores a large amount of data, and the transfer task is not completed by 01:00 on January 3. In this case, Level-1 Backup B is deleted after it expires at 01:00 on January 3 and is not transferred to a level-2 backup.

The following figure shows the total size of level-2 backup. The total size of level-2 backup is the sum of the data sizes of all level-2 backup.2

Physical log backup

  • Benefits

    The log backup feature allows you to create backup by uploading real-time redo logs to Object Storage Service (OSS) in parallel. Log backup can be stored in the same region as the PolarDB cluster or in a different region. They are retained for 3 to 7,300 days. You can save the backup permanently by enabling the Permanently Retain Backups before Cluster Deletion feature.

    Note

    By default, log backup is stored in the same region as the PolarDB cluster. This backup storage method cannot be disabled.

    Log backup helps consistent point-in-time recovery. Based on a full backup set (snapshot) and the redo logs generated after the backup set is created, you can perform point-in-time recovery (PITR) for a PolarDB cluster. Log backup can prevent data loss caused by user errors and ensure the security of data that is generated within a period of time. If you perform PITR, you must consider the amount of time that is required to query redo logs. Redo logs are queried at a rate of 1 GB every 20 seconds to 70 seconds. The total restoration duration is the sum of the time required to restore backup sets and the time required to query redo logs.

  • How to view the size of a backup set

    The following figure shows that the total size of log backup is the sum of the size of each log backup file.

    日志大小

Single-region backup and cross-region backup

  • Differences

    Backup type

    Description

    Default configuration

    Scenario

    Benefit

    Single-region backup

    Back up files are stored in the same region as the PolarDB cluster but in a different zone.

    Enabled.

    Note

    This storage method is enabled by default when you enable level-2 backup.

    Long-term archiving

    Allows you to reduce costs by dumping data at a low backup frequency.

    Cross-region backup

    Back up files are stored in a different region from the PolarDB cluster.

    Disabled. Cross-region backup must be manually enabled.

    Geo-redundancy and MLPS level 3

    Allows you to reduce recovery point objective (RPO). This backup storage method is suitable for private network environments that are encrypted and highly secure. You can reduce costs by dumping data at a low backup frequency.

    Note

    Low-frequency level-2 backup: The backup frequency of level-2 backup is lower than that of level-1 backup.

  • Alibaba Cloud regions in which the cross-region backup feature is supported

    Source region

    Destination region

    China (Hangzhou), China (Shanghai), China (Qingdao), China (Beijing), China (Shenzhen), and China (Hong Kong).

    China (Hangzhou), China (Shanghai), China (Qingdao), China (Beijing), China (Shenzhen), and China (Hong Kong).

    Note

    Cross-region backup files are replicated to a region that is different from the source region.

    US (Silicon Valley)

    US (Virginia)

    US (Virginia)

    US (Silicon Valley)

    China East 1 Finance

    China East 2 Finance and China South 1 Finance

    China East 2 Finance

    China East 1 Finance and China South 1 Finance

    China South 1 Finance

    China East 1 Finance and China East 2 Finance